Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/dependency-injection/Compiler/PassConfig.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php Thu Feb 28 13:21:36 2019 +0000 @@ -29,9 +29,9 @@ const TYPE_REMOVE = 'removing'; private $mergePass; - private $afterRemovingPasses = array(); - private $beforeOptimizationPasses = array(); - private $beforeRemovingPasses = array(); + private $afterRemovingPasses = []; + private $beforeOptimizationPasses = []; + private $beforeRemovingPasses = []; private $optimizationPasses; private $removingPasses; @@ -39,24 +39,24 @@ { $this->mergePass = new MergeExtensionConfigurationPass(); - $this->beforeOptimizationPasses = array( - 100 => array( + $this->beforeOptimizationPasses = [ + 100 => [ $resolveClassPass = new ResolveClassPass(), new ResolveInstanceofConditionalsPass(), new RegisterEnvVarProcessorsPass(), - ), - -1000 => array(new ExtensionCompilerPass()), - ); + ], + -1000 => [new ExtensionCompilerPass()], + ]; - $this->optimizationPasses = array(array( + $this->optimizationPasses = [[ new ResolveChildDefinitionsPass(), new ServiceLocatorTagPass(), + new RegisterServiceSubscribersPass(), new DecoratorServicePass(), new ResolveParameterPlaceHoldersPass(false), new ResolveFactoryClassPass(), new FactoryReturnTypePass($resolveClassPass), new CheckDefinitionValidityPass(), - new RegisterServiceSubscribersPass(), new ResolveNamedArgumentsPass(), new AutowireRequiredMethodsPass(), new ResolveBindingsPass(), @@ -69,28 +69,28 @@ new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), new CheckArgumentsValidityPass(false), - )); + ]]; - $this->beforeRemovingPasses = array( - -100 => array( + $this->beforeRemovingPasses = [ + -100 => [ new ResolvePrivatesPass(), - ), - ); + ], + ]; - $this->removingPasses = array(array( + $this->removingPasses = [[ new RemovePrivateAliasesPass(), new ReplaceAliasByActualDefinitionPass(), new RemoveAbstractDefinitionsPass(), - new RepeatedPass(array( + new RepeatedPass([ new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass(), new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass(), - )), + ]), new DefinitionErrorExceptionPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), new ResolveHotPathPass(), - )); + ]]; } /** @@ -101,7 +101,7 @@ public function getPasses() { return array_merge( - array($this->mergePass), + [$this->mergePass], $this->getBeforeOptimizationPasses(), $this->getOptimizationPasses(), $this->getBeforeRemovingPasses(), @@ -121,10 +121,10 @@ */ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/) { - if (func_num_args() >= 3) { + if (\func_num_args() >= 3) { $priority = func_get_arg(2); } else { - if (__CLASS__ !== get_class($this)) { + if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED); @@ -142,7 +142,7 @@ $passes = &$this->$property; if (!isset($passes[$priority])) { - $passes[$priority] = array(); + $passes[$priority] = []; } $passes[$priority][] = $pass; } @@ -219,7 +219,7 @@ */ public function setAfterRemovingPasses(array $passes) { - $this->afterRemovingPasses = array($passes); + $this->afterRemovingPasses = [$passes]; } /** @@ -229,7 +229,7 @@ */ public function setBeforeOptimizationPasses(array $passes) { - $this->beforeOptimizationPasses = array($passes); + $this->beforeOptimizationPasses = [$passes]; } /** @@ -239,7 +239,7 @@ */ public function setBeforeRemovingPasses(array $passes) { - $this->beforeRemovingPasses = array($passes); + $this->beforeRemovingPasses = [$passes]; } /** @@ -249,7 +249,7 @@ */ public function setOptimizationPasses(array $passes) { - $this->optimizationPasses = array($passes); + $this->optimizationPasses = [$passes]; } /** @@ -259,7 +259,7 @@ */ public function setRemovingPasses(array $passes) { - $this->removingPasses = array($passes); + $this->removingPasses = [$passes]; } /** @@ -271,13 +271,13 @@ */ private function sortPasses(array $passes) { - if (0 === count($passes)) { - return array(); + if (0 === \count($passes)) { + return []; } krsort($passes); // Flatten the array - return call_user_func_array('array_merge', $passes); + return \call_user_func_array('array_merge', $passes); } }