Passed
Push — master ( 949105...80b49c )
by Filipe
01:51 queued 19s
created
src/ContainerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function register(
36 36
         string       $name,
37 37
         mixed        $definition = null,
38
-        string|Scope $scope = Scope::SINGLETON,
38
+        string | Scope $scope = Scope::SINGLETON,
39 39
         array        $parameters = []
40 40
     ): Container;
41 41
 
Please login to merge, or discard this patch.
src/Definition/CreateDefinitionsMethods.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     protected function createDefinition(
36 36
         mixed $value,
37 37
         array $parameters = []
38
-    ): Value|Alias|Factory {
38
+    ): Value | Alias | Factory {
39 39
         if (is_callable($value)) {
40 40
             return new Factory($value, $parameters);
41 41
         }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return Value|Alias
54 54
      */
55
-    protected function createValueDefinition(mixed $value): Value|Alias
55
+    protected function createValueDefinition(mixed $value): Value | Alias
56 56
     {
57 57
         if (is_string($value) && str_contains($value, '@')) {
58 58
             return new Alias($value);
Please login to merge, or discard this patch.
src/DefinitionLoader/DirectoryDefinitionLoader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
             $directory = new RecursiveDirectoryIterator($directory);
55 55
         } catch (\Exception $caught) {
56 56
             throw new InvalidDefinitionsPathException(
57
-                'Provided definitions path is not valid or is not found. ' .
58
-                'Could not create container. Please check ' . $directory
57
+                'Provided definitions path is not valid or is not found. '.
58
+                'Could not create container. Please check '.$directory
59 59
             );
60 60
         }
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $phpFiles = new \RegexIterator($iterator, '/.*\.php$/i');
64 64
 
65 65
         foreach ($phpFiles as $phpFile) {
66
-            $definitions = (array)(new FileDefinitionLoader($phpFile))->getIterator();
66
+            $definitions = (array) (new FileDefinitionLoader($phpFile))->getIterator();
67 67
             $this->definitions = array_merge($this->definitions, $definitions);
68 68
         }
69 69
     }
Please login to merge, or discard this patch.
src/DefinitionLoader/AutowireDefinitionLoader/ClassFile.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         preg_match($namespaceRegEx, $this->content, $found);
107 107
 
108 108
         $this->namespace = trim($found['namespace']);
109
-        $this->className = $this->namespace . "\\" . trim($matches['name']) ?? null;
109
+        $this->className = $this->namespace."\\".trim($matches['name']) ?? null;
110 110
 
111 111
         $interfaces = $this->clearNames($matches['interfaces'] ? explode(',', $matches['interfaces']) : []);
112 112
         $parentClass = $matches['parent'] ?? null;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
             $interfaces[] = str_starts_with($interfaceName, "\\")
173 173
                 ? $interfaceName
174
-                : $this->namespace . "\\" . $interfaceName;
174
+                : $this->namespace."\\".$interfaceName;
175 175
         }
176 176
         return $interfaces;
177 177
     }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         }
195 195
         return str_starts_with(trim($parentClass), "\\")
196 196
             ? trim($parentClass)
197
-            : $this->namespace . "\\" . trim($parentClass);
197
+            : $this->namespace."\\".trim($parentClass);
198 198
     }
199 199
 
200 200
     /**
Please login to merge, or discard this patch.
src/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     public function register(
113 113
         string       $name,
114 114
         mixed        $definition = null,
115
-        string|Scope $scope = Scope::SINGLETON,
115
+        string | Scope $scope = Scope::SINGLETON,
116 116
         array        $parameters = []
117 117
     ): Container {
118 118
         if ($definition instanceof DefinitionInterface) {
Please login to merge, or discard this patch.
src/DefinitionLoader/AutowireDefinitionLoader.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
     {
56 56
         try {
57 57
             $this->directoryWatcher = new Directory($path);
58
-        } catch (DirectoryNotFound|DirectoryNotAccecible) {
58
+        } catch (DirectoryNotFound | DirectoryNotAccecible) {
59 59
             throw new InvalidDefinitionsPathException(
60
-                'Provided autowire definitions path is not valid or is not found. ' .
61
-                'Could not create container. Please check ' . $path
60
+                'Provided autowire definitions path is not valid or is not found. '.
61
+                'Could not create container. Please check '.$path
62 62
             );
63 63
         }
64 64
 
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
             $directory = new RecursiveDirectoryIterator($path);
96 96
         } catch (Exception) {
97 97
             throw new InvalidDefinitionsPathException(
98
-                'Provided autowire definitions path is not valid or is not found. ' .
99
-                'Could not create container. Please check ' . $path
98
+                'Provided autowire definitions path is not valid or is not found. '.
99
+                'Could not create container. Please check '.$path
100 100
             );
101 101
         }
102 102
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
     private function saveImplementations(): void
149 149
     {
150
-        $file = sys_get_temp_dir() . self::TMP_FILE_NAME;
150
+        $file = sys_get_temp_dir().self::TMP_FILE_NAME;
151 151
         if (is_file($file)) {
152 152
             unlink($file);
153 153
         }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
     private function loadImplementations(): bool
162 162
     {
163
-        $file = sys_get_temp_dir() . self::TMP_FILE_NAME;
163
+        $file = sys_get_temp_dir().self::TMP_FILE_NAME;
164 164
         if (!file_exists($file)) {
165 165
             return false;
166 166
         }
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
 
192 192
     private function createCallback(string $className): callable
193 193
     {
194
-        return function (Container $container) use ($className) {
194
+        return function(Container $container) use ($className) {
195 195
             return $container->make($className);
196 196
         };
197 197
     }
198 198
 
199 199
     private function createAmbiguousCallback(string $interface): callable
200 200
     {
201
-        return function () use ($interface) {
202
-            throw new AmbiguousImplementationException("Ambiguous implementation for '$interface'. " .
201
+        return function() use ($interface) {
202
+            throw new AmbiguousImplementationException("Ambiguous implementation for '$interface'. ".
203 203
                 "There are more then 1 implementations you need to provide a service definition for this interface.");
204 204
         };
205 205
     }
Please login to merge, or discard this patch.
src/ContainerBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     /**
27 27
      * @var array|string
28 28
      */
29
-    private string|array $definitions = [];
29
+    private string | array $definitions = [];
30 30
 
31 31
     /**
32 32
      * @throws Exception|\Slick\Di\Exception
Please login to merge, or discard this patch.
src/Definition/AbstractDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return self|$this|AbstractDefinition
40 40
      */
41
-    public function setScope($scope): DefinitionInterface|static
41
+    public function setScope($scope): DefinitionInterface | static
42 42
     {
43 43
         $this->scope = $scope;
44 44
         return $this;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return Scope|string
51 51
      */
52
-    public function getScope(): string|Scope
52
+    public function getScope(): string | Scope
53 53
     {
54 54
         if (!$this->scope) {
55 55
             return Scope::Singleton();
Please login to merge, or discard this patch.
src/DefinitionInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
      *
34 34
      * @return self|$this|DefinitionInterface
35 35
      */
36
-    public function setScope($scope): DefinitionInterface|static;
36
+    public function setScope($scope): DefinitionInterface | static;
37 37
 
38 38
     /**
39 39
      * Get resolution scope
40 40
      *
41 41
      * @return Scope|string
42 42
      */
43
-    public function getScope(): string|Scope;
43
+    public function getScope(): string | Scope;
44 44
 }
Please login to merge, or discard this patch.