@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function parse(Node $node, NodeInterface $parent): NodeInterface |
35 | 35 | { |
36 | - if (! method_exists($this, 'invoke')) { |
|
36 | + if (!method_exists($this, 'invoke')) { |
|
37 | 37 | throw new ParseException(sprintf( |
38 | 38 | 'Class "%s" must implements method "invoke" described in AbstractNodeParser', |
39 | 39 | get_class($this) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function get($id): object |
68 | 68 | { |
69 | - if (! Validator::stringType()->validate($id)) { |
|
69 | + if (!Validator::stringType()->validate($id)) { |
|
70 | 70 | throw new ContainerException('Identifier is not a string.'); |
71 | 71 | } |
72 | 72 | return $this->resolveInstance($id); |
@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | */ |
133 | 133 | private function autoResolve(string $class): object |
134 | 134 | { |
135 | - if (! class_exists($class)) { |
|
135 | + if (!class_exists($class)) { |
|
136 | 136 | throw new ContainerException(sprintf('Class "%s" does not exists.', $class)); |
137 | 137 | } |
138 | 138 | |
139 | 139 | $reflection = new \ReflectionClass($class); |
140 | 140 | |
141 | - if (! $reflection->isInstantiable()) { |
|
141 | + if (!$reflection->isInstantiable()) { |
|
142 | 142 | throw new ContainerException(sprintf('Class "%s" is not instantiable.', $class)); |
143 | 143 | } |
144 | 144 | return $this->buildInstance($reflection); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if (($constructor = $reflection->getConstructor()) === null) { |
159 | 159 | return $reflection->newInstance(); |
160 | 160 | } |
161 | - if (! $constructor->isPublic()) { |
|
161 | + if (!$constructor->isPublic()) { |
|
162 | 162 | throw new ContainerException( |
163 | 163 | sprintf('Class "%s" has no public constructor.', $reflection->getName()) |
164 | 164 | ); |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function validate(string $path): bool |
48 | 48 | { |
49 | - if (! $this->validatePath($path)) { |
|
49 | + if (!$this->validatePath($path)) { |
|
50 | 50 | return false; |
51 | 51 | } |
52 | - if (! $this->validateIncludeRegex($path) |
|
53 | - || ! $this->validateExcludeRegex($path) |
|
52 | + if (!$this->validateIncludeRegex($path) |
|
53 | + || !$this->validateExcludeRegex($path) |
|
54 | 54 | ) { |
55 | 55 | return false; |
56 | 56 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | private function validatePath(string $path): bool |
71 | 71 | { |
72 | - if (! $this->fileSystem->has($path)) { |
|
72 | + if (!$this->fileSystem->has($path)) { |
|
73 | 73 | throw new FileNotFoundException(sprintf('The source file "%s" does not exist.', $path)); |
74 | 74 | } |
75 | 75 | if ($this->fileSystem->get($path)->getType() === 'dir') { |