services: Add linebreak between regular and spread parameter
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 14 Jun 2018 23:22:52 +0000 (00:22 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 14 Jun 2018 23:22:52 +0000 (00:22 +0100)
Follows-up 1e680456b4, which removed some array_merge/call_user_func
abstraction, but improved readability a lot, but the absence of a
line break makes it slightly less obvious how and what parameters
are being passed. It's usually either comma-separated segments on
the same line that as the open parenthesis, or one expression per
line.

Change-Id: Ic388cf41ed3ed60d9b47c04392242e40cdcb69b0

includes/services/ServiceContainer.php

index c98b7da..7814194 100644 (file)
@@ -356,7 +356,8 @@ class ServiceContainer implements DestructibleService {
        private function createService( $name ) {
                if ( isset( $this->serviceInstantiators[$name] ) ) {
                        $service = ( $this->serviceInstantiators[$name] )(
-                               $this, ...$this->extraInstantiationParams
+                               $this,
+                               ...$this->extraInstantiationParams
                        );
                        // NOTE: when adding more wiring logic here, make sure copyWiring() is kept in sync!
                } else {