@@ -46,15 +46,15 @@ discard block |
||
| 46 | 46 | // 1. configuration data |
| 47 | 47 | // 2. creating instances |
| 48 | 48 | |
| 49 | - if(preg_match('/^settings\./', $configuration, $m) === 1) |
|
| 49 | + if (preg_match('/^settings\./', $configuration, $m) === 1) |
|
| 50 | 50 | { |
| 51 | 51 | return $this->get_settings($configuration); |
| 52 | 52 | } |
| 53 | - elseif(preg_match('/.+Controller$/', $configuration, $m) === 1) |
|
| 53 | + elseif (preg_match('/.+Controller$/', $configuration, $m) === 1) |
|
| 54 | 54 | { |
| 55 | - foreach($this->get_settings('settings.controllers_namespaces') as $controller_namespace) |
|
| 55 | + foreach ($this->get_settings('settings.controllers_namespaces') as $controller_namespace) |
|
| 56 | 56 | { |
| 57 | - if(class_exists($controller_namespace.$configuration)) |
|
| 57 | + if (class_exists($controller_namespace.$configuration)) |
|
| 58 | 58 | return $this->get_instance($controller_namespace.$configuration); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $instance = null; |
| 71 | 71 | if (!is_null($rc->getConstructor())) { |
| 72 | 72 | foreach ($rc->getConstructor()->getParameters() as $param) { |
| 73 | - $construction_args [] = $this->get($param->getType() . ''); |
|
| 73 | + $construction_args [] = $this->get($param->getType().''); |
|
| 74 | 74 | } |
| 75 | 75 | $instance = $rc->newInstanceArgs($construction_args); |
| 76 | 76 | } else { |
@@ -49,13 +49,13 @@ |
||
| 49 | 49 | if(preg_match('/^settings\./', $configuration, $m) === 1) |
| 50 | 50 | { |
| 51 | 51 | return $this->get_settings($configuration); |
| 52 | - } |
|
| 53 | - elseif(preg_match('/.+Controller$/', $configuration, $m) === 1) |
|
| 52 | + } elseif(preg_match('/.+Controller$/', $configuration, $m) === 1) |
|
| 54 | 53 | { |
| 55 | 54 | foreach($this->get_settings('settings.controllers_namespaces') as $controller_namespace) |
| 56 | 55 | { |
| 57 | - if(class_exists($controller_namespace.$configuration)) |
|
| 58 | - return $this->get_instance($controller_namespace.$configuration); |
|
| 56 | + if(class_exists($controller_namespace.$configuration)) { |
|
| 57 | + return $this->get_instance($controller_namespace.$configuration); |
|
| 58 | + } |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |