@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @param string $class_type_interface_or_instance The expected target class/type/interface/instance |
35 | 35 | */ |
36 | - public function __construct($class_type_interface_or_instance=null) |
|
36 | + public function __construct($class_type_interface_or_instance = null) |
|
37 | 37 | { |
38 | 38 | if ($class_type_interface_or_instance) { |
39 | 39 | $this->expectedTarget = $class_type_or_instance; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | foreach ($this->stack as $i => $call) { |
103 | 103 | if (isset($call['method'])) { |
104 | 104 | $string .= '->'; |
105 | - $string .= $call['method'].'('; |
|
105 | + $string .= $call['method'] . '('; |
|
106 | 106 | $string .= implode(', ', array_map(function($argument) { |
107 | 107 | return var_export($argument, true); |
108 | 108 | }, $call['arguments'])); |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | } |
135 | 135 | elseif (is_string($this->expectedTarget)) { |
136 | 136 | if (class_exists($this->expectedTarget)) { |
137 | - if (! $target instanceof $this->expectedTarget) { |
|
137 | + if (!$target instanceof $this->expectedTarget) { |
|
138 | 138 | throw new BadTargetClassException($this, $this->expectedTarget, $target); |
139 | 139 | } |
140 | 140 | } |
141 | 141 | elseif (interface_exists($this->expectedTarget)) { |
142 | - if (! $target instanceof $this->expectedTarget) { |
|
142 | + if (!$target instanceof $this->expectedTarget) { |
|
143 | 143 | throw new BadTargetInterfaceException($this, $this->expectedTarget, $target); |
144 | 144 | } |
145 | 145 | } |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | |
221 | 221 | return |
222 | 222 | $trace[0]['function'] == '__call' |
223 | - && $trace[0]['class'] == get_class($current_chained_subject) |
|
224 | - && $trace[0]['args'][0] == $method_name |
|
223 | + && $trace[0]['class'] == get_class($current_chained_subject) |
|
224 | + && $trace[0]['args'][0] == $method_name |
|
225 | 225 | && ( |
226 | 226 | $trace[$call_user_func_array_position]['file'] == __FILE__ |
227 | 227 | && $trace[$call_user_func_array_position]['function'] == 'call_user_func_array' |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @param mixed $target The target to apply the callchain on |
236 | 236 | * @return mixed The value returned once the call chain is called uppon $target |
237 | 237 | */ |
238 | - public function __invoke($target=null) |
|
238 | + public function __invoke($target = null) |
|
239 | 239 | { |
240 | 240 | $out = $this->checkTarget($target); |
241 | 241 | |
@@ -251,13 +251,13 @@ discard block |
||
251 | 251 | ); |
252 | 252 | } |
253 | 253 | |
254 | - if (! $is_called && is_callable($call['method'])) { |
|
254 | + if (!$is_called && is_callable($call['method'])) { |
|
255 | 255 | $arguments = $this->prepareArgs($call['arguments'], $out); |
256 | 256 | $out = call_user_func_array($call['method'], $arguments); |
257 | 257 | $is_called = true; |
258 | 258 | } |
259 | 259 | |
260 | - if (! $is_called) { |
|
260 | + if (!$is_called) { |
|
261 | 261 | throw new \BadMethodCallException( |
262 | 262 | $call['method'] . "() is neither a method of " . get_class($out) |
263 | 263 | . " nor a function" |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | } |
267 | 267 | else { |
268 | - $out = $out[ $call['entry'] ]; |
|
268 | + $out = $out[$call['entry']]; |
|
269 | 269 | } |
270 | 270 | } |
271 | 271 | catch (\Exception $e) { |