@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function obtener(string $abstract) |
| 21 | 21 | { |
| 22 | - if(interface_exists($abstract)) |
|
| 22 | + if (interface_exists($abstract)) |
|
| 23 | 23 | { |
| 24 | 24 | $interface = explode('\\', $abstract); |
| 25 | 25 | $abstract = $this->_rutas[$interface[1]]; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - if(isset($this->_bindings[$abstract])) |
|
| 28 | + if (isset($this->_bindings[$abstract])) |
|
| 29 | 29 | { |
| 30 | 30 | return $this->_bindings[$abstract]($this); |
| 31 | 31 | } |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | private function buildDependencies(ReflectionClass $reflection): array |
| 41 | 41 | { |
| 42 | - if(!$constructor = $reflection->getConstructor()) |
|
| 42 | + if (!$constructor = $reflection->getConstructor()) |
|
| 43 | 43 | { |
| 44 | 44 | return []; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $params = $constructor->getParameters(); |
| 48 | 48 | |
| 49 | - return array_map(function ($param) |
|
| 49 | + return array_map(function($param) |
|
| 50 | 50 | { |
| 51 | - if(!$type = $param->getType()) |
|
| 51 | + if (!$type = $param->getType()) |
|
| 52 | 52 | { |
| 53 | 53 | throw new RuntimeException(); |
| 54 | 54 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | class PrimerClase |
| 6 | 6 | { |
| 7 | - public function __construct |
|
| 8 | - ( |
|
| 7 | + public function __construct( |
|
| 9 | 8 | SegundaClase $SegundaClase |
| 10 | 9 | ) |
| 11 | 10 | { |