@@ -65,8 +65,9 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | public function probeClasses(string $className, array $construction_args = []): ?object |
| 67 | 67 | { |
| 68 | - if(class_exists($className)) |
|
| 69 | - return $this->factory->serve($className, $construction_args); |
|
| 68 | + if(class_exists($className)) { |
|
| 69 | + return $this->factory->serve($className, $construction_args); |
|
| 70 | + } |
|
| 70 | 71 | |
| 71 | 72 | return null; |
| 72 | 73 | } |
@@ -79,8 +80,9 @@ discard block |
||
| 79 | 80 | |
| 80 | 81 | $wires = $this->container->get('wiring') ?? []; |
| 81 | 82 | |
| 82 | - if (!isset($wires[$lamentation])) |
|
| 83 | - throw new NotFoundException(__FUNCTION__."($lamentation) is not wired to a class"); |
|
| 83 | + if (!isset($wires[$lamentation])) { |
|
| 84 | + throw new NotFoundException(__FUNCTION__."($lamentation) is not wired to a class"); |
|
| 85 | + } |
|
| 84 | 86 | |
| 85 | 87 | $wire = $wires[$lamentation]; |
| 86 | 88 | |
@@ -110,9 +112,9 @@ discard block |
||
| 110 | 112 | |
| 111 | 113 | $class_name = $this->cascadeNamespace($class_name); |
| 112 | 114 | |
| 113 | - if(is_null($class_name)) |
|
| 114 | - $ret = null; |
|
| 115 | - elseif (self::hasClassNameModifier($lamentation)) { |
|
| 115 | + if(is_null($class_name)) { |
|
| 116 | + $ret = null; |
|
| 117 | + } elseif (self::hasClassNameModifier($lamentation)) { |
|
| 116 | 118 | $ret = $class_name; |
| 117 | 119 | } elseif (self::hasNewInstanceModifier($lamentation)) { |
| 118 | 120 | $ret = $this->factory->build($class_name, []); |