@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | class ReflectionFactory |
| 6 | 6 | { |
| 7 | - public static function make($class, $construction_args = [], $container){ |
|
| 7 | + public static function make($class, $construction_args = [], $container) { |
|
| 8 | 8 | try { |
| 9 | 9 | $rc = new \ReflectionClass($class); |
| 10 | 10 | $instance = null; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($param->getType()) { |
| 42 | 42 | $construction_args [] = $container->get($param->getType()->getName()); |
| 43 | 43 | } else { |
| 44 | - $setting = 'settings.Constructor.' . $constructor->class . '.' . $param->getName(); |
|
| 44 | + $setting = 'settings.Constructor.'.$constructor->class.'.'.$param->getName(); |
|
| 45 | 45 | $construction_args [] = $container->getSettings($setting); |
| 46 | 46 | } |
| 47 | 47 | } |
@@ -139,8 +139,7 @@ |
||
| 139 | 139 | |
| 140 | 140 | if ($configuration->hasClassNameModifier()) { |
| 141 | 141 | $ret = $class_name; |
| 142 | - } |
|
| 143 | - elseif ($configuration->hasNewInstanceModifier()) { |
|
| 142 | + } elseif ($configuration->hasNewInstanceModifier()) { |
|
| 144 | 143 | $ret = $this->makeInstance($class_name); |
| 145 | 144 | } |
| 146 | 145 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | foreach ($dbg['interface_wiring'] as $interface => $wire) { |
| 60 | 60 | if (is_array($wire)) { |
| 61 | - $wire = array_shift($wire) . ' --array #' . count($wire); |
|
| 61 | + $wire = array_shift($wire).' --array #'.count($wire); |
|
| 62 | 62 | } |
| 63 | 63 | $dbg['interface_wiring'][$interface] = $wire; |
| 64 | 64 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | return $ret; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - private function cascadeInstance(Configuration $configuration){ |
|
| 143 | + private function cascadeInstance(Configuration $configuration) { |
|
| 144 | 144 | $class_name = $configuration->getModelOrControllerName(); |
| 145 | 145 | $class_name = $this->cascadeNamespace($class_name); |
| 146 | 146 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | // not fully namespaced, lets cascade |
| 180 | 180 | foreach ($this->namespace_cascade as $ns) { |
| 181 | - if (class_exists($fully_namespaced = $ns . $class_name)) { |
|
| 181 | + if (class_exists($fully_namespaced = $ns.$class_name)) { |
|
| 182 | 182 | $this->resolved($class_name, $fully_namespaced); |
| 183 | 183 | return $fully_namespaced; |
| 184 | 184 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function getModelOrControllerName() |
| 38 | 38 | { |
| 39 | 39 | preg_match(self::RX_MVC, $this->lament, $m); |
| 40 | - return $m[1] . '\\' . $m[2]; |
|
| 40 | + return $m[1].'\\'.$m[2]; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function hasClassNameModifier() |