@@ -63,7 +63,7 @@ |
||
63 | 63 | $v = null; |
64 | 64 | $this->container->getDefinition($this->currentId)->addError($e->getMessage()); |
65 | 65 | } |
66 | - return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value; |
|
66 | + return $this->resolveArrays || ! $v || ! \is_array($v) ? $v : $value; |
|
67 | 67 | } |
68 | 68 | if ($value instanceof Definition) { |
69 | 69 | $value->setBindings($this->processValue($value->getBindings())); |
@@ -100,9 +100,9 @@ |
||
100 | 100 | public function log(CompilerPassInterface $pass, $message) |
101 | 101 | { |
102 | 102 | if (\false !== \strpos($message, "\n")) { |
103 | - $message = \str_replace("\n", "\n" . \get_class($pass) . ': ', \trim($message)); |
|
103 | + $message = \str_replace("\n", "\n".\get_class($pass).': ', \trim($message)); |
|
104 | 104 | } |
105 | - $this->log[] = \get_class($pass) . ': ' . $message; |
|
105 | + $this->log[] = \get_class($pass).': '.$message; |
|
106 | 106 | } |
107 | 107 | /** |
108 | 108 | * Returns the log. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function __construct(ResolveClassPass $resolveClassPass = null) |
25 | 25 | { |
26 | 26 | if (null === $resolveClassPass) { |
27 | - @\trigger_error('The ' . __CLASS__ . ' class is deprecated since Symfony 3.3 and will be removed in 4.0.', \E_USER_DEPRECATED); |
|
27 | + @\trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', \E_USER_DEPRECATED); |
|
28 | 28 | } |
29 | 29 | $this->resolveClassPass = $resolveClassPass; |
30 | 30 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function process(ContainerBuilder $container) |
35 | 35 | { |
36 | 36 | // works only since php 7.0 and hhvm 3.11 |
37 | - if (!\method_exists(\ReflectionMethod::class, 'getReturnType')) { |
|
37 | + if ( ! \method_exists(\ReflectionMethod::class, 'getReturnType')) { |
|
38 | 38 | return; |
39 | 39 | } |
40 | 40 | $resolveClassPassChanges = null !== $this->resolveClassPass ? $this->resolveClassPass->getChanges() : []; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return; |
50 | 50 | } |
51 | 51 | $factory = $definition->getFactory(); |
52 | - if (null === $factory || !isset($resolveClassPassChanges[$id]) && null !== $definition->getClass()) { |
|
52 | + if (null === $factory || ! isset($resolveClassPassChanges[$id]) && null !== $definition->getClass()) { |
|
53 | 53 | return; |
54 | 54 | } |
55 | 55 | $class = null; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } else { |
73 | 73 | $class = $factory[0]; |
74 | 74 | } |
75 | - if (!($m = $container->getReflectionClass($class, \false))) { |
|
75 | + if ( ! ($m = $container->getReflectionClass($class, \false))) { |
|
76 | 76 | return; |
77 | 77 | } |
78 | 78 | try { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | } |
84 | 84 | $returnType = $m->getReturnType(); |
85 | - if (null !== $returnType && !$returnType->isBuiltin()) { |
|
85 | + if (null !== $returnType && ! $returnType->isBuiltin()) { |
|
86 | 86 | $returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; |
87 | 87 | if (null !== $class) { |
88 | 88 | $declaringClass = $m->getDeclaringClass()->getName(); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $returnType = \get_parent_class($declaringClass) ?: null; |
93 | 93 | } |
94 | 94 | } |
95 | - if (null !== $returnType && (!isset($resolveClassPassChanges[$id]) || $returnType !== $resolveClassPassChanges[$id])) { |
|
95 | + if (null !== $returnType && ( ! isset($resolveClassPassChanges[$id]) || $returnType !== $resolveClassPassChanges[$id])) { |
|
96 | 96 | @\trigger_error(\sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), \E_USER_DEPRECATED); |
97 | 97 | } |
98 | 98 | $definition->setClass($returnType); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | if (1 === \count($referencingAliases) && \false === $isReferenced) { |
60 | 60 | $container->setDefinition((string) \reset($referencingAliases), $definition); |
61 | - $definition->setPublic(!$definition->isPrivate()); |
|
61 | + $definition->setPublic( ! $definition->isPrivate()); |
|
62 | 62 | $definition->setPrivate(\reset($referencingAliases)->isPrivate()); |
63 | 63 | $container->removeDefinition($id); |
64 | 64 | $container->log($this, \sprintf('Removed service "%s"; reason: replaces alias %s.', $id, \reset($referencingAliases))); |
@@ -22,10 +22,10 @@ |
||
22 | 22 | { |
23 | 23 | protected function processValue($value, $isRoot = \false) |
24 | 24 | { |
25 | - if (!$value instanceof Reference) { |
|
25 | + if ( ! $value instanceof Reference) { |
|
26 | 26 | return parent::processValue($value, $isRoot); |
27 | 27 | } |
28 | - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() && !$this->container->has($id = (string) $value)) { |
|
28 | + if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() && ! $this->container->has($id = (string) $value)) { |
|
29 | 29 | throw new ServiceNotFoundException($id, $this->currentId); |
30 | 30 | } |
31 | 31 | return $value; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | continue; |
58 | 58 | } |
59 | 59 | // Remove private definition and schedule for replacement |
60 | - $definition->setPublic(!$target->isPrivate()); |
|
60 | + $definition->setPublic( ! $target->isPrivate()); |
|
61 | 61 | $definition->setPrivate($target->isPrivate()); |
62 | 62 | $container->setDefinition($definitionId, $definition); |
63 | 63 | $container->removeDefinition($targetId); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function getNode($id) |
51 | 51 | { |
52 | - if (!isset($this->nodes[$id])) { |
|
52 | + if ( ! isset($this->nodes[$id])) { |
|
53 | 53 | throw new InvalidArgumentException(\sprintf('There is no node with id "%s".', $id)); |
54 | 54 | } |
55 | 55 | return $this->nodes[$id]; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === $this->container->normalizeId($value)) { |
27 | 27 | return new Reference($this->serviceLocator); |
28 | 28 | } |
29 | - if (!$value instanceof Definition) { |
|
29 | + if ( ! $value instanceof Definition) { |
|
30 | 30 | return parent::processValue($value, $isRoot); |
31 | 31 | } |
32 | 32 | $serviceLocator = $this->serviceLocator; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->graph->connect($this->currentId, $this->currentDefinition, $targetId, $targetDefinition, $value, $this->lazy || $this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy(), ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), $this->byConstructor); |
87 | 87 | return $value; |
88 | 88 | } |
89 | - if (!$value instanceof Definition) { |
|
89 | + if ( ! $value instanceof Definition) { |
|
90 | 90 | return parent::processValue($value, $isRoot); |
91 | 91 | } |
92 | 92 | if ($isRoot) { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $this->processValue($value->getFactory()); |
104 | 104 | $this->processValue($value->getArguments()); |
105 | 105 | $this->byConstructor = $byConstructor; |
106 | - if (!$this->onlyConstructorArguments) { |
|
106 | + if ( ! $this->onlyConstructorArguments) { |
|
107 | 107 | $this->processValue($value->getProperties()); |
108 | 108 | $this->processValue($value->getMethodCalls()); |
109 | 109 | $this->processValue($value->getConfigurator()); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | while ($this->container->hasAlias($id)) { |
128 | 128 | $id = (string) $this->container->getAlias($id); |
129 | 129 | } |
130 | - if (!$this->container->hasDefinition($id)) { |
|
130 | + if ( ! $this->container->hasDefinition($id)) { |
|
131 | 131 | return null; |
132 | 132 | } |
133 | 133 | return $this->container->normalizeId($id); |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | private function getExpressionLanguage() |
136 | 136 | { |
137 | 137 | if (null === $this->expressionLanguage) { |
138 | - if (!\class_exists(ExpressionLanguage::class)) { |
|
138 | + if ( ! \class_exists(ExpressionLanguage::class)) { |
|
139 | 139 | throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); |
140 | 140 | } |
141 | 141 | $providers = $this->container->getExpressionLanguageProviders(); |
142 | - $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) { |
|
142 | + $this->expressionLanguage = new ExpressionLanguage(null, $providers, function($arg) { |
|
143 | 143 | if ('""' === \substr_replace($arg, '', 1, -1)) { |
144 | 144 | $id = \stripcslashes(\substr($arg, 1, -1)); |
145 | 145 | $id = $this->getDefinitionId($id); |