Completed
Push — develop ( daf290...9a283c )
by Paul
02:03
created
src/Container/Container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             );
Please login to merge, or discard this patch.
src/Validator/FileValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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') {
Please login to merge, or discard this patch.
src/Exception/ExceptionCatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * {@inheritdoc}
47 47
      */
48
-    public function catch(Exception $exception, string $path): void
48
+    public function catch (Exception $exception, string $path): void
49 49
     {
50 50
         if ($this->config->hasIgnore()
51 51
             && $exception instanceof IgnorableException
Please login to merge, or discard this patch.
src/Model/PropertyTrait/ClassLikeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     public function countNotAbstractFunctions(): int
58 58
     {
59 59
         return $this->functions->filter(function (FunctionModelInterface $function) {
60
-            return ! $function->isAbstract();
60
+            return !$function->isAbstract();
61 61
         })->count();
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Parser/NodeParser/DocumentationNodeParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                 // It is a string opening.
270 270
                 $this->openedStringToken = $type;
271 271
             } else {
272
-                if (! $this->currentlyEscaping && $type === $this->openedStringToken) {
272
+                if (!$this->currentlyEscaping && $type === $this->openedStringToken) {
273 273
                     // We are in a string, the token is not escaped and is the same as the string opening token.
274 274
                     // Close the string.
275 275
                     $this->openedStringToken = null;
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     private function afterConsume(int $type): void
287 287
     {
288 288
         // Put in escaping mode if it were not escaping and there is a backslash token.
289
-        if (! $this->currentlyEscaping && $type === Lexer::T_BACKSLASH) {
289
+        if (!$this->currentlyEscaping && $type === Lexer::T_BACKSLASH) {
290 290
             $this->currentlyEscaping = true;
291 291
         } else {
292 292
             $this->currentlyEscaping = false;
Please login to merge, or discard this patch.
src/Configuration/ConsoleConfig.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
     private function validateBooleans($config): void
42 42
     {
43 43
         // Check boolean parameters
44
-        if (! Validator::key('overwrite', Validator::boolType())->validate($config)) {
44
+        if (!Validator::key('overwrite', Validator::boolType())->validate($config)) {
45 45
             throw new InvalidConfigException('"overwrite" parameter must be set as a boolean.');
46 46
         }
47
-        if (! Validator::key('ignore', Validator::boolType())->validate($config)) {
47
+        if (!Validator::key('ignore', Validator::boolType())->validate($config)) {
48 48
             throw new InvalidConfigException('"ignore" parameter must be set as a boolean.');
49 49
         }
50 50
     }
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
      */
59 59
     private function validateIncludeRegex($config): void
60 60
     {
61
-        if (! Validator::key('include', Validator::stringType())->validate($config)
62
-            && ! Validator::key('include', Validator::nullType())->validate($config)
61
+        if (!Validator::key('include', Validator::stringType())->validate($config)
62
+            && !Validator::key('include', Validator::nullType())->validate($config)
63 63
         ) {
64 64
             throw new InvalidConfigException('"include" parameter must be set as a string or a null value.');
65 65
         }
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
      */
75 75
     private function validateExcludeRegex($config): void
76 76
     {
77
-        if (! Validator::key('exclude', Validator::stringType())->validate($config)
78
-            && ! Validator::key('exclude', Validator::nullType())->validate($config)
77
+        if (!Validator::key('exclude', Validator::stringType())->validate($config)
78
+            && !Validator::key('exclude', Validator::nullType())->validate($config)
79 79
         ) {
80 80
             throw new InvalidConfigException('"exclude" parameter must be set as a string or a null value.');
81 81
         }
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
     private function validateDirs($config): void
92 92
     {
93 93
         // Check that dirs key exists
94
-        if (! Validator::key('dirs', Validator::arrayType())->validate($config)) {
94
+        if (!Validator::key('dirs', Validator::arrayType())->validate($config)) {
95 95
             throw new InvalidConfigException('"dirs" parameter is not an array.');
96 96
         }
97 97
         // Validate each dirs
98
-        if (! Validator::arrayVal()
98
+        if (!Validator::arrayVal()
99 99
             ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs'])
100 100
         ) {
101 101
             throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
     private function validateFiles($config): void
113 113
     {
114 114
         // Check that files key exists
115
-        if (! Validator::key('files', Validator::arrayType())->validate($config)) {
115
+        if (!Validator::key('files', Validator::arrayType())->validate($config)) {
116 116
             throw new InvalidConfigException('"files" parameter is not an array.');
117 117
         }
118 118
         // Validate each files
119
-        if (! Validator::arrayVal()
119
+        if (!Validator::arrayVal()
120 120
             ->each(Validator::stringType(), Validator::stringType())->validate($config['files'])
121 121
         ) {
122 122
             throw new InvalidConfigException('Some files in "files" parameter are not strings.');
Please login to merge, or discard this patch.
src/Configuration/YamlConsoleConfigFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
                 $exception->getMessage()
31 31
             ));
32 32
         }
33
-        if (! is_array($configArray)) {
33
+        if (!is_array($configArray)) {
34 34
             throw new InvalidConfigException('Invalid YAML config');
35 35
         }
36 36
         return $configArray;
Please login to merge, or discard this patch.
src/Configuration/BaseConfig.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
     protected function validate($config): void
53 53
     {
54 54
         // Check that $config is an array
55
-        if (! Validator::arrayType()->validate($config)) {
55
+        if (!Validator::arrayType()->validate($config)) {
56 56
             throw new InvalidConfigException('The config must be an array.');
57 57
         }
58 58
 
59 59
         // Check boolean parameters
60
-        if (! Validator::key('interface', Validator::boolType())->validate($config)) {
60
+        if (!Validator::key('interface', Validator::boolType())->validate($config)) {
61 61
             throw new InvalidConfigException('"interface" parameter must be set as a boolean.');
62 62
         }
63
-        if (! Validator::key('auto', Validator::boolType())->validate($config)) {
63
+        if (!Validator::key('auto', Validator::boolType())->validate($config)) {
64 64
             throw new InvalidConfigException('"auto" parameter must be set as a boolean.');
65 65
         }
66 66
 
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
     private function validatePhpdoc($config): void
78 78
     {
79 79
         // Check that dirs key exists
80
-        if (! Validator::key('phpdoc', Validator::arrayType())->validate($config)) {
80
+        if (!Validator::key('phpdoc', Validator::arrayType())->validate($config)) {
81 81
             throw new InvalidConfigException('"phpdoc" parameter is not an array.');
82 82
         }
83 83
         // Validate each phpdoc
84
-        if (! Validator::arrayVal()
84
+        if (!Validator::arrayVal()
85 85
             ->each(Validator::stringType(), Validator::stringType())->validate($config['phpdoc'])
86 86
         ) {
87 87
             throw new InvalidConfigException('Some annotation in "phpdoc" parameter are not strings.');
Please login to merge, or discard this patch.
src/Configuration/PhpConsoleConfigFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     protected function decode(string $configPath): array
22 22
     {
23 23
         $configArray = require $configPath;
24
-        if (! is_array($configArray)) {
24
+        if (!is_array($configArray)) {
25 25
             throw new InvalidConfigException('Invalid PHP config');
26 26
         }
27 27
         return $configArray;
Please login to merge, or discard this patch.