@@ -124,8 +124,7 @@ discard block |
||
| 124 | 124 | return static::varExport($argument, ['short_objects']); |
| 125 | 125 | }, $call['arguments'])); |
| 126 | 126 | $string .= ')'; |
| 127 | - } |
|
| 128 | - else { |
|
| 127 | + } else { |
|
| 129 | 128 | $string .= '[' . static::varExport($call['entry'], ['short_objects']) . ']'; |
| 130 | 129 | } |
| 131 | 130 | |
@@ -161,8 +160,7 @@ discard block |
||
| 161 | 160 | |
| 162 | 161 | if (is_object($variable)) { |
| 163 | 162 | $export = get_class($variable) . ' #' . spl_object_id($variable); |
| 164 | - } |
|
| 165 | - elseif (is_string($variable)) { |
|
| 163 | + } elseif (is_string($variable)) { |
|
| 166 | 164 | $keep_length = ceil(($options['max_length'] - 5) / 2); |
| 167 | 165 | |
| 168 | 166 | $export = substr($variable, 0, $keep_length) |
@@ -190,30 +188,25 @@ discard block |
||
| 190 | 188 | } |
| 191 | 189 | |
| 192 | 190 | $out = $this->expectedTarget; |
| 193 | - } |
|
| 194 | - elseif (is_string($this->expectedTarget)) { |
|
| 191 | + } elseif (is_string($this->expectedTarget)) { |
|
| 195 | 192 | if (class_exists($this->expectedTarget)) { |
| 196 | 193 | if (! $target instanceof $this->expectedTarget) { |
| 197 | 194 | throw new BadTargetClassException($this, $this->expectedTarget, $target); |
| 198 | 195 | } |
| 199 | - } |
|
| 200 | - elseif (interface_exists($this->expectedTarget)) { |
|
| 196 | + } elseif (interface_exists($this->expectedTarget)) { |
|
| 201 | 197 | if (! $target instanceof $this->expectedTarget) { |
| 202 | 198 | throw new BadTargetInterfaceException($this, $this->expectedTarget, $target); |
| 203 | 199 | } |
| 204 | - } |
|
| 205 | - elseif (type_exists($this->expectedTarget)) { |
|
| 200 | + } elseif (type_exists($this->expectedTarget)) { |
|
| 206 | 201 | if (gettype($target) != $this->expectedTarget) { |
| 207 | 202 | throw new BadTargetTypeException($this, $this->expectedTarget, $target); |
| 208 | 203 | } |
| 209 | - } |
|
| 210 | - else { |
|
| 204 | + } else { |
|
| 211 | 205 | throw new UndefinedTargetClassException($this, $this->expectedTarget); |
| 212 | 206 | } |
| 213 | 207 | |
| 214 | 208 | $out = $target; |
| 215 | - } |
|
| 216 | - else { |
|
| 209 | + } else { |
|
| 217 | 210 | $out = $target; |
| 218 | 211 | } |
| 219 | 212 | |
@@ -241,16 +234,14 @@ discard block |
||
| 241 | 234 | [$current_chained_subject, $method_name], |
| 242 | 235 | $arguments |
| 243 | 236 | ); |
| 244 | - } |
|
| 245 | - catch (\BadMethodCallException $e) { |
|
| 237 | + } catch (\BadMethodCallException $e) { |
|
| 246 | 238 | if ($this->exceptionTrownFromMagicCall( |
| 247 | 239 | $e->getTrace(), |
| 248 | 240 | $current_chained_subject, |
| 249 | 241 | $method_name |
| 250 | 242 | )) { |
| 251 | 243 | $is_called = false; |
| 252 | - } |
|
| 253 | - else { |
|
| 244 | + } else { |
|
| 254 | 245 | throw $e; |
| 255 | 246 | } |
| 256 | 247 | } |
@@ -322,12 +313,10 @@ discard block |
||
| 322 | 313 | . " nor a function" |
| 323 | 314 | ); |
| 324 | 315 | } |
| 325 | - } |
|
| 326 | - else { |
|
| 316 | + } else { |
|
| 327 | 317 | $out = $out[ $call['entry'] ]; |
| 328 | 318 | } |
| 329 | - } |
|
| 330 | - catch (\Exception $e) { |
|
| 319 | + } catch (\Exception $e) { |
|
| 331 | 320 | |
| 332 | 321 | $callchain_description = $this->toString([ |
| 333 | 322 | 'target' => $target, |