Passed
Push — main ( 0ea40c...aad742 )
by Sammy
03:21
created
src/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
             // Get parameter type, if exists
90 90
             $id = $param->getType()
91 91
                 ? $param->getType()->getName()
92
-                : 'settings.Constructor.' . $constructor->class . '.' . $param->getName();
92
+                : 'settings.Constructor.'.$constructor->class.'.'.$param->getName();
93 93
             
94 94
             // Get resource with Id and append to return array
95 95
             $ret [] = $this->container->get($id);
Please login to merge, or discard this patch.
src/Solver.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function solve(string $lamentation)
30 30
     {
31
-        return $this->probeSettings ($lamentation)
32
-            ?? $this->probeClasses  ($lamentation)
31
+        return $this->probeSettings($lamentation)
32
+            ?? $this->probeClasses($lamentation)
33 33
             ?? $this->probeInterface($lamentation)
34
-            ?? $this->probeCascade  ($lamentation);
34
+            ?? $this->probeCascade($lamentation);
35 35
     }
36 36
 
37 37
     //dot based hierarchy, parse and climb
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $walked = [];
49 49
         foreach ($path as $k) {
50 50
             
51
-            $walked []= $k;
51
+            $walked [] = $k;
52 52
             
53 53
             if (isset($settings[$k])) {
54 54
                 $settings = $settings[$k];
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             }
57 57
 
58 58
             // we didn't continue; we failed
59
-            $walked = 'settings.' . implode('.', $walked);
59
+            $walked = 'settings.'.implode('.', $walked);
60 60
             throw new NotFoundException(__FUNCTION__."($lamentation) failed at $walked");
61 61
         }
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function probeClasses(string $className, array $construction_args = []): ?object
67 67
     {
68
-        if(class_exists($className))
68
+        if (class_exists($className))
69 69
             return $this->factory->serve($className, $construction_args);
70 70
 
71 71
         return null;
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
             return null;
107 107
         }
108 108
         
109
-        $class_name = $m[1] . '\\' . $m[2];
109
+        $class_name = $m[1].'\\'.$m[2];
110 110
 
111 111
         $class_name = $this->cascadeNamespace($class_name);
112 112
 
113
-        if(is_null($class_name))
113
+        if (is_null($class_name))
114 114
             $ret = null;
115 115
         elseif (self::hasClassNameModifier($lamentation)) {
116 116
             $ret = $class_name;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         foreach ($cascade as $namespace) {
137 137
 
138
-            $fully_namespaced = $namespace . $class_name;
138
+            $fully_namespaced = $namespace.$class_name;
139 139
             
140 140
             if (class_exists($fully_namespaced)) {
141 141
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,8 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function probeClasses(string $className, array $construction_args = []): ?object
67 67
     {
68
-        if(class_exists($className))
69
-            return $this->factory->serve($className, $construction_args);
68
+        if(class_exists($className)) {
69
+                    return $this->factory->serve($className, $construction_args);
70
+        }
70 71
 
71 72
         return null;
72 73
     }
@@ -79,8 +80,9 @@  discard block
 block discarded – undo
79 80
 
80 81
         $wires = $this->container->get('wiring') ?? [];
81 82
 
82
-        if (!isset($wires[$lamentation]))
83
-            throw new NotFoundException(__FUNCTION__."($lamentation) is not wired to a class");
83
+        if (!isset($wires[$lamentation])) {
84
+                    throw new NotFoundException(__FUNCTION__."($lamentation) is not wired to a class");
85
+        }
84 86
 
85 87
         $wire = $wires[$lamentation];
86 88
 
@@ -110,9 +112,9 @@  discard block
 block discarded – undo
110 112
 
111 113
         $class_name = $this->cascadeNamespace($class_name);
112 114
 
113
-        if(is_null($class_name))
114
-            $ret = null;
115
-        elseif (self::hasClassNameModifier($lamentation)) {
115
+        if(is_null($class_name)) {
116
+                    $ret = null;
117
+        } elseif (self::hasClassNameModifier($lamentation)) {
116 118
             $ret = $class_name;
117 119
         } elseif (self::hasNewInstanceModifier($lamentation)) {
118 120
             $ret = $this->factory->build($class_name, []);
Please login to merge, or discard this patch.
src/LeMarchand.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
 
58 58
         foreach ($dbg['configurations']['wiring'] as $interface => $wire) {
59 59
             if (is_array($wire)) {
60
-                $wire = array_shift($wire) . ' --array #' . count($wire);
60
+                $wire = array_shift($wire).' --array #'.count($wire);
61 61
             }
62 62
             $dbg['configurations']['wiring'] = $wire;
63 63
         }
Please login to merge, or discard this patch.