@@ -50,7 +50,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 80 | 80 | |
| 81 | 81 | return $instance; |
| 82 | 82 | } |
| 83 | - catch(\ReflectionException $e) |
|
| 83 | + catch (\ReflectionException $e) |
|
| 84 | 84 | { |
| 85 | 85 | return null; |
| 86 | 86 | } |
@@ -79,8 +79,7 @@ |
||
| 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 | } |