@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | protected function processDependenciesFromAnnotations(ServiceLocatorInterface $container, $serviceName) |
23 | 23 | { |
24 | - if (! class_exists($serviceName)) { |
|
24 | + if (!class_exists($serviceName)) { |
|
25 | 25 | throw new RuntimeException(sprintf( |
26 | 26 | 'Annotated factories can only be used with services that are identified by their FQCN. ' . |
27 | 27 | 'Provided "%s" service name is not a valid class.', |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | $annotationReader = $this->createAnnotationReader($container); |
33 | 33 | $refClass = new \ReflectionClass($serviceName); |
34 | 34 | $constructor = $refClass->getConstructor(); |
35 | - if (! isset($constructor)) { |
|
35 | + if (!isset($constructor)) { |
|
36 | 36 | return new $serviceName(); |
37 | 37 | } |
38 | 38 | |
39 | 39 | /** @var Inject $inject */ |
40 | 40 | $inject = $annotationReader->getMethodAnnotation($constructor, Inject::class); |
41 | - if (! isset($inject)) { |
|
41 | + if (!isset($inject)) { |
|
42 | 42 | throw new RuntimeException(sprintf( |
43 | 43 | 'You need to use the "%s" annotation in "%s" constructor so that the "%s" can create it.', |
44 | 44 | Inject::class, |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $parts = explode('.', $serviceKey); |
53 | 53 | $serviceKey = array_shift($parts); |
54 | 54 | |
55 | - if (! $container->has($serviceKey)) { |
|
55 | + if (!$container->has($serviceKey)) { |
|
56 | 56 | throw new RuntimeException(sprintf( |
57 | 57 | 'Defined injectable service "%s" could not be found in container.', |
58 | 58 | $serviceKey |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | return self::$annotationReader; |
79 | 79 | } |
80 | 80 | |
81 | - AnnotationRegistry::registerLoader(function ($class) { |
|
81 | + AnnotationRegistry::registerLoader(function($class) { |
|
82 | 82 | $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; |
83 | 83 | $file = realpath(__DIR__ . '/../Annotation/' . basename($file)); |
84 | - if (! $file) { |
|
84 | + if (!$file) { |
|
85 | 85 | return false; |
86 | 86 | } |
87 | 87 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | return true; |
90 | 90 | }); |
91 | 91 | |
92 | - if (! $container->has(self::CACHE_SERVICE)) { |
|
92 | + if (!$container->has(self::CACHE_SERVICE)) { |
|
93 | 93 | return self::$annotationReader = new AnnotationReader(); |
94 | 94 | } else { |
95 | 95 | /** @var Cache $cache */ |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | { |
108 | 108 | $key = array_shift($keys); |
109 | 109 | $value = isset($array[$key]) ? $array[$key] : null; |
110 | - if (! empty($keys) && is_array($value)) { |
|
110 | + if (!empty($keys) && is_array($value)) { |
|
111 | 111 | $value = $this->readKeysFromArray($keys, $value); |
112 | 112 | } |
113 | 113 |