@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function get($id): object |
| 70 | 70 | { |
| 71 | - if (! Validator::stringType()->validate($id)) { |
|
| 71 | + if (!Validator::stringType()->validate($id)) { |
|
| 72 | 72 | throw new ContainerException('Identifier is not a string'); |
| 73 | 73 | } |
| 74 | 74 | return $this->resolveInstance($id); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | throw new ContainerException(sprintf('Class "%s" does not exists', $class)); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if (! $reflection->isInstantiable()) { |
|
| 128 | + if (!$reflection->isInstantiable()) { |
|
| 129 | 129 | throw new ContainerException(sprintf('Class "%s" is not instantiable', $class)); |
| 130 | 130 | } |
| 131 | 131 | return $this->buildInstance($reflection); |
@@ -71,13 +71,13 @@ |
||
| 71 | 71 | private function validate($decoded): void |
| 72 | 72 | { |
| 73 | 73 | // Validate it is an array |
| 74 | - if (! Validator::arrayType()->length(2, 2)->validate($decoded)) { |
|
| 74 | + if (!Validator::arrayType()->length(2, 2)->validate($decoded)) { |
|
| 75 | 75 | throw new AnnotationParseException( |
| 76 | 76 | '"mock" annotation content is invalid (must contains the class to mock and the property name)' |
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | // Validate that each value is a string |
| 80 | - if (! Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded)) { |
|
| 80 | + if (!Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded)) { |
|
| 81 | 81 | throw new AnnotationParseException( |
| 82 | 82 | '"mock" annotation content is invalid (class and property name must be string)' |
| 83 | 83 | ); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | private function validate($decoded): void |
| 75 | 75 | { |
| 76 | 76 | // Validate it is an array |
| 77 | - if (! Validator::arrayType()->length(1, 2)->validate($decoded)) { |
|
| 77 | + if (!Validator::arrayType()->length(1, 2)->validate($decoded)) { |
|
| 78 | 78 | throw new AnnotationParseException( |
| 79 | 79 | '"construct" annotation content is invalid (must contains parameters array, and maybe a class)' |
| 80 | 80 | ); |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | $size = count($decoded); |
| 84 | 84 | |
| 85 | 85 | // Validate that if size is 2, first value is a string |
| 86 | - if ($size === 2 && ! Validator::stringType()->validate($decoded[0])) { |
|
| 86 | + if ($size === 2 && !Validator::stringType()->validate($decoded[0])) { |
|
| 87 | 87 | throw new AnnotationParseException( |
| 88 | 88 | '"construct" annotation content is invalid (constructor class must be a string)' |
| 89 | 89 | ); |
| 90 | 90 | } |
| 91 | 91 | // Validate that last value is an array |
| 92 | - if (! Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded[$size-1])) { |
|
| 92 | + if (!Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded[$size - 1])) { |
|
| 93 | 93 | throw new AnnotationParseException( |
| 94 | 94 | '"construct" annotation content is invalid (constructor parameters must be a array of string)' |
| 95 | 95 | ); |