Passed
Push — main ( 0778be...698825 )
by Sammy
01:26
created
LeMarchand.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         // 2. creating instances
51 51
         if (preg_match('/.+Controller$/', $configuration, $m) === 1) {
52 52
             foreach ($this->getSettings('settings.controllers_namespaces') as $controller_namespace) {
53
-                if (!is_null($instance = $this->getInstance($controller_namespace . $configuration))) {
53
+                if (!is_null($instance = $this->getInstance($controller_namespace.$configuration))) {
54 54
                     return $instance;
55 55
                 }
56 56
             }
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
     private function getInstance($class)
63 63
     {
64
-      try{
64
+      try {
65 65
         $rc = new \ReflectionClass($class);
66
-        $instance=null;
66
+        $instance = null;
67 67
         $construction_args = [];
68 68
         if (!is_null($rc->getConstructor())) {
69 69
             foreach ($rc->getConstructor()->getParameters() as $param) {
70
-                $construction_args [] = $this->get($param->getType() . '');
70
+                $construction_args [] = $this->get($param->getType().'');
71 71
             }
72 72
             $instance = $rc->newInstanceArgs($construction_args);
73 73
         } else {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         return $instance;
82 82
       }
83
-      catch(\ReflectionException $e)
83
+      catch (\ReflectionException $e)
84 84
       {
85 85
         return null;
86 86
       }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
         }
80 80
 
81 81
         return $instance;
82
-      }
83
-      catch(\ReflectionException $e)
82
+      } catch(\ReflectionException $e)
84 83
       {
85 84
         return null;
86 85
       }
Please login to merge, or discard this patch.