@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | if (Validator::stringType()->validate($decoded[$index])) { |
| 57 | 57 | $phpFile = RootRetrieverHelper::getRoot($this); |
| 58 | 58 | // If class to use is not from global namespace |
| 59 | - if (! Validator::regex('/^\\\\/')->validate($decoded[$index])) { |
|
| 59 | + if (!Validator::regex('/^\\\\/')->validate($decoded[$index])) { |
|
| 60 | 60 | // Add the current namespace to it |
| 61 | 61 | $namespace = $phpFile->getNamespaceString(); |
| 62 | 62 | $decoded[$index] = ($namespace !== null ? ($namespace . '\\') : '') . $decoded[$index]; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | private function validate($decoded): void |
| 83 | 83 | { |
| 84 | 84 | // Validate it is an array |
| 85 | - if (! Validator::arrayType()->length(1, 2)->validate($decoded)) { |
|
| 85 | + if (!Validator::arrayType()->length(1, 2)->validate($decoded)) { |
|
| 86 | 86 | throw new AnnotationParseException( |
| 87 | 87 | '"construct" annotation content is invalid (must contains parameters array, and maybe a class)' |
| 88 | 88 | ); |
@@ -91,13 +91,13 @@ discard block |
||
| 91 | 91 | $size = count($decoded); |
| 92 | 92 | |
| 93 | 93 | // Validate that if size is 2, first value is a string |
| 94 | - if ($size === 2 && ! Validator::stringType()->validate($decoded[0])) { |
|
| 94 | + if ($size === 2 && !Validator::stringType()->validate($decoded[0])) { |
|
| 95 | 95 | throw new AnnotationParseException( |
| 96 | 96 | '"construct" annotation content is invalid (constructor class must be a string)' |
| 97 | 97 | ); |
| 98 | 98 | } |
| 99 | 99 | // Validate that last value is an array |
| 100 | - if (! Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded[$size-1])) { |
|
| 100 | + if (!Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded[$size - 1])) { |
|
| 101 | 101 | throw new AnnotationParseException( |
| 102 | 102 | '"construct" annotation content is invalid (constructor parameters must be a array of string)' |
| 103 | 103 | ); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $phpFile = RootRetrieverHelper::getRoot($this); |
| 56 | 56 | // If class to use is not from global namespace |
| 57 | - if (! Validator::regex('/^\\\\/')->validate($decoded[0])) { |
|
| 57 | + if (!Validator::regex('/^\\\\/')->validate($decoded[0])) { |
|
| 58 | 58 | // Add the current namespace to it |
| 59 | 59 | $namespace = $phpFile->getNamespaceString(); |
| 60 | 60 | $decoded[0] = ($namespace !== null ? ($namespace . '\\') : '') . $decoded[0]; |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | private function validate($decoded): void |
| 79 | 79 | { |
| 80 | 80 | // Validate it is an array |
| 81 | - if (! Validator::arrayType()->length(2, 2)->validate($decoded)) { |
|
| 81 | + if (!Validator::arrayType()->length(2, 2)->validate($decoded)) { |
|
| 82 | 82 | throw new AnnotationParseException( |
| 83 | 83 | '"mock" annotation content is invalid (must contains the class to mock and the property name)' |
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | // Validate that each value is a string |
| 87 | - if (! Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded)) { |
|
| 87 | + if (!Validator::arrayVal()->each(Validator::stringType(), Validator::intType())->validate($decoded)) { |
|
| 88 | 88 | throw new AnnotationParseException( |
| 89 | 89 | '"mock" annotation content is invalid (class and property name must be string)' |
| 90 | 90 | ); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | } catch (JsonException $exception) { |
| 44 | 44 | throw new AnnotationParseException('"assertion" annotation content is invalid (invalid JSON content)'); |
| 45 | 45 | } |
| 46 | - if (! is_string($decoded)) { |
|
| 46 | + if (!is_string($decoded)) { |
|
| 47 | 47 | throw new AnnotationParseException( |
| 48 | 48 | '"assertion" annotation content is invalid (expected value must be a string)' |
| 49 | 49 | ); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | } catch (JsonException $exception) { |
| 44 | 44 | throw new AnnotationParseException('"setter" annotation content is invalid (invalid JSON content)'); |
| 45 | 45 | } |
| 46 | - if (! is_string($decoded)) { |
|
| 46 | + if (!is_string($decoded)) { |
|
| 47 | 47 | throw new AnnotationParseException( |
| 48 | 48 | '"setter" annotation content is invalid (property name must be a string)' |
| 49 | 49 | ); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | private function saveFunctionAnnotation(FunctionModelInterface $parent, AnnotationInterface $annotation): void |
| 60 | 60 | { |
| 61 | - if (! $parent->isGlobal() && $parent->isPublic()) { |
|
| 61 | + if (!$parent->isGlobal() && $parent->isPublic()) { |
|
| 62 | 62 | // For public or not global function, all annotation except constructor |
| 63 | 63 | if ($annotation->getType() !== AnnotationInterface::TYPE_CONSTRUCTOR) { |
| 64 | 64 | $annotation->setParentNode($parent); |