From: Timo Tijhof Date: Thu, 14 Jun 2018 23:22:52 +0000 (+0100) Subject: services: Add linebreak between regular and spread parameter X-Git-Tag: 1.34.0-rc.0~5048^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/Template:Foo?a=commitdiff_plain;h=935ccd6335bf9e090ef6a73ca2f425c8809c5b9d;p=lhc%2Fweb%2Fwiklou.git services: Add linebreak between regular and spread parameter 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 --- diff --git a/includes/services/ServiceContainer.php b/includes/services/ServiceContainer.php index c98b7da79c..7814194fea 100644 --- a/includes/services/ServiceContainer.php +++ b/includes/services/ServiceContainer.php @@ -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 {