@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | throw new \InvalidArgumentException('An empty file name is not valid to be located.'); |
36 | 36 | } |
37 | 37 | if ($this->isAbsolutePath($name)) { |
38 | - if (!\file_exists($name)) { |
|
38 | + if ( ! \file_exists($name)) { |
|
39 | 39 | throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); |
40 | 40 | } |
41 | 41 | return $name; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $paths = \array_unique($paths); |
48 | 48 | $filepaths = $notfound = []; |
49 | 49 | foreach ($paths as $path) { |
50 | - if (@\file_exists($file = $path . \DIRECTORY_SEPARATOR . $name)) { |
|
50 | + if (@\file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) { |
|
51 | 51 | if (\true === $first) { |
52 | 52 | return $file; |
53 | 53 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $notfound[] = $file; |
57 | 57 | } |
58 | 58 | } |
59 | - if (!$filepaths) { |
|
59 | + if ( ! $filepaths) { |
|
60 | 60 | throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist (in: "%s").', $name, \implode('", "', $paths)), 0, null, $notfound); |
61 | 61 | } |
62 | 62 | return $filepaths; |
@@ -31,11 +31,11 @@ |
||
31 | 31 | */ |
32 | 32 | public function cache($file, $callback) |
33 | 33 | { |
34 | - if (!\is_callable($callback)) { |
|
34 | + if ( ! \is_callable($callback)) { |
|
35 | 35 | throw new \InvalidArgumentException(\sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback))); |
36 | 36 | } |
37 | 37 | $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers); |
38 | - if (!$cache->isFresh()) { |
|
38 | + if ( ! $cache->isFresh()) { |
|
39 | 39 | \call_user_func($callback, $cache); |
40 | 40 | } |
41 | 41 | return $cache; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function get($id) |
44 | 44 | { |
45 | - if (!isset($this->factories[$id])) { |
|
45 | + if ( ! isset($this->factories[$id])) { |
|
46 | 46 | throw new ServiceNotFoundException($id, \end($this->loading) ?: null, null, [], $this->createServiceNotFoundMessage($id)); |
47 | 47 | } |
48 | 48 | if (isset($this->loading[$id])) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $externalId = $this->externalId ?: $class; |
83 | 83 | $msg = []; |
84 | 84 | $msg[] = \sprintf('Service "%s" not found:', $id); |
85 | - if (!$this->container) { |
|
85 | + if ( ! $this->container) { |
|
86 | 86 | $class = null; |
87 | 87 | } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { |
88 | 88 | $msg[] = 'even though it exists in the app\'s container,'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } else { |
104 | 104 | $msg[] = \sprintf('the current service locator %s', $this->formatAlternatives()); |
105 | 105 | } |
106 | - if (!$class) { |
|
106 | + if ( ! $class) { |
|
107 | 107 | // no-op |
108 | 108 | } elseif (\is_subclass_of($class, ServiceSubscriberInterface::class)) { |
109 | 109 | $msg[] = \sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', \preg_replace('/([^\\\\]++\\\\)++/', '', $class)); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | { |
117 | 117 | $format = '"%s"%s'; |
118 | 118 | if (null === $alternatives) { |
119 | - if (!($alternatives = \array_keys($this->factories))) { |
|
119 | + if ( ! ($alternatives = \array_keys($this->factories))) { |
|
120 | 120 | return 'is empty...'; |
121 | 121 | } |
122 | 122 | $format = \sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : ''); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | public function isFresh(ResourceInterface $resource, $timestamp) |
38 | 38 | { |
39 | 39 | foreach ($resource->getParameters() as $key => $value) { |
40 | - if (!$this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) { |
|
40 | + if ( ! $this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) { |
|
41 | 41 | return \false; |
42 | 42 | } |
43 | 43 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function __toString() |
33 | 33 | { |
34 | - return 'container_parameters_' . \md5(\serialize($this->parameters)); |
|
34 | + return 'container_parameters_'.\md5(\serialize($this->parameters)); |
|
35 | 35 | } |
36 | 36 | /** |
37 | 37 | * @internal |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | namespace Wordlift\Modules\Plugin_Installer_Dependencies\Symfony\Component\DependencyInjection\Config; |
12 | 12 | |
13 | -@\trigger_error('The ' . __NAMESPACE__ . '\\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED); |
|
13 | +@\trigger_error('The '.__NAMESPACE__.'\\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED); |
|
14 | 14 | use Wordlift\Modules\Plugin_Installer_Dependencies\Symfony\Component\Config\Resource\SelfCheckingResourceInterface; |
15 | 15 | use Wordlift\Modules\Plugin_Installer_Dependencies\Symfony\Component\DependencyInjection\Compiler\AutowirePass; |
16 | 16 | /** |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | public function isFresh($timestamp) |
31 | 31 | { |
32 | - if (!\file_exists($this->filePath)) { |
|
32 | + if ( ! \file_exists($this->filePath)) { |
|
33 | 33 | return \false; |
34 | 34 | } |
35 | 35 | // has the file *not* been modified? Definitely fresh |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | public function __toString() |
48 | 48 | { |
49 | - return 'service.autowire.' . $this->class; |
|
49 | + return 'service.autowire.'.$this->class; |
|
50 | 50 | } |
51 | 51 | /** |
52 | 52 | * @internal |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->setCurrentDir(\dirname($path)); |
34 | 34 | $this->container->fileExists($path); |
35 | 35 | // the closure forbids access to the private scope in the included file |
36 | - $load = \Closure::bind(function ($path) use($container, $loader, $resource, $type) { |
|
36 | + $load = \Closure::bind(function($path) use($container, $loader, $resource, $type) { |
|
37 | 37 | return include $path; |
38 | 38 | }, $this, ProtectedPhpFileLoader::class); |
39 | 39 | $callback = $load($path); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function supports($resource, $type = null) |
48 | 48 | { |
49 | - if (!\is_string($resource)) { |
|
49 | + if ( ! \is_string($resource)) { |
|
50 | 50 | return \false; |
51 | 51 | } |
52 | 52 | if (null === $type && 'php' === \pathinfo($resource, \PATHINFO_EXTENSION)) { |
@@ -52,7 +52,7 @@ |
||
52 | 52 | { |
53 | 53 | parent::__destruct(); |
54 | 54 | $this->container->removeBindings($this->id); |
55 | - if (!$this->definition instanceof ChildDefinition) { |
|
55 | + if ( ! $this->definition instanceof ChildDefinition) { |
|
56 | 56 | $this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof)); |
57 | 57 | } else { |
58 | 58 | $this->container->setDefinition($this->id, $this->definition); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->defaults = new Definition(); |
34 | 34 | $this->container = $container; |
35 | 35 | $this->loader = $loader; |
36 | - $this->instanceof =& $instanceof; |
|
36 | + $this->instanceof = & $instanceof; |
|
37 | 37 | $instanceof = []; |
38 | 38 | } |
39 | 39 | /** |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | public final function set($id, $class = null) |
69 | 69 | { |
70 | 70 | $defaults = $this->defaults; |
71 | - $allowParent = !$defaults->getChanges() && empty($this->instanceof); |
|
71 | + $allowParent = ! $defaults->getChanges() && empty($this->instanceof); |
|
72 | 72 | $definition = new Definition(); |
73 | - if (!$defaults->isPublic() || !$defaults->isPrivate()) { |
|
74 | - $definition->setPublic($defaults->isPublic() && !$defaults->isPrivate()); |
|
73 | + if ( ! $defaults->isPublic() || ! $defaults->isPrivate()) { |
|
74 | + $definition->setPublic($defaults->isPublic() && ! $defaults->isPrivate()); |
|
75 | 75 | } |
76 | 76 | $definition->setAutowired($defaults->isAutowired()); |
77 | 77 | $definition->setAutoconfigured($defaults->isAutoconfigured()); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | $ref = static::processValue($referencedId, \true); |
95 | 95 | $alias = new Alias((string) $ref); |
96 | - if (!$this->defaults->isPublic() || !$this->defaults->isPrivate()) { |
|
96 | + if ( ! $this->defaults->isPublic() || ! $this->defaults->isPrivate()) { |
|
97 | 97 | $alias->setPublic($this->defaults->isPublic()); |
98 | 98 | } |
99 | 99 | $this->container->setAlias($id, $alias); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public final function load($namespace, $resource) |
111 | 111 | { |
112 | - $allowParent = !$this->defaults->getChanges() && empty($this->instanceof); |
|
112 | + $allowParent = ! $this->defaults->getChanges() && empty($this->instanceof); |
|
113 | 113 | return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, $allowParent); |
114 | 114 | } |
115 | 115 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public final function get($id) |
125 | 125 | { |
126 | - $allowParent = !$this->defaults->getChanges() && empty($this->instanceof); |
|
126 | + $allowParent = ! $this->defaults->getChanges() && empty($this->instanceof); |
|
127 | 127 | $definition = $this->container->getDefinition($id); |
128 | 128 | return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []); |
129 | 129 | } |