Completed
Push — master ( 1a93ee...d3779a )
by Jean
02:11
created
src/DeferredCallChain.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -80,30 +80,25 @@  discard block
 block discarded – undo
80 80
             }
81 81
             
82 82
             $out = $this->expectedTarget;
83
-        }
84
-        elseif (is_string($this->expectedTarget)) {
83
+        } elseif (is_string($this->expectedTarget)) {
85 84
             if (class_exists($this->expectedTarget)) {
86 85
                 if (! $target instanceof $this->expectedTarget) {
87 86
                     throw new BadTargetClassException($this, $this->expectedTarget, $target);
88 87
                 }
89
-            }
90
-            elseif (interface_exists($this->expectedTarget)) {
88
+            } elseif (interface_exists($this->expectedTarget)) {
91 89
                 if (! $target instanceof $this->expectedTarget) {
92 90
                     throw new BadTargetInterfaceException($this, $this->expectedTarget, $target);
93 91
                 }
94
-            }
95
-            elseif (type_exists($this->expectedTarget)) {
92
+            } elseif (type_exists($this->expectedTarget)) {
96 93
                 if (gettype($target) != $this->expectedTarget) {
97 94
                     throw new BadTargetTypeException($this, $this->expectedTarget, $target);
98 95
                 }
99
-            }
100
-            else {
96
+            } else {
101 97
                 throw new UndefinedTargetClassException($this, $this->expectedTarget);
102 98
             }
103 99
             
104 100
             $out = $target;
105
-        }
106
-        else {
101
+        } else {
107 102
             $out = $target;
108 103
         }
109 104
         
@@ -131,16 +126,14 @@  discard block
 block discarded – undo
131 126
                 [$current_chained_subject, $method_name], 
132 127
                 $arguments
133 128
             );
134
-        }
135
-        catch (\BadMethodCallException $e) {
129
+        } catch (\BadMethodCallException $e) {
136 130
             if ($this->exceptionTrownFromMagicCall(
137 131
                 $e->getTrace(),
138 132
                 $current_chained_subject,
139 133
                 $method_name
140 134
             )) {
141 135
                 $is_called = false;
142
-            }
143
-            else {
136
+            } else {
144 137
                 throw $e;
145 138
             }
146 139
         }
@@ -212,12 +205,10 @@  discard block
 block discarded – undo
212 205
                             . " nor a function"
213 206
                         );
214 207
                     }
215
-                }
216
-                else {
208
+                } else {
217 209
                     $out = $out[ $call['entry'] ];
218 210
                 }
219
-            }
220
-            catch (\Exception $e) {
211
+            } catch (\Exception $e) {
221 212
                 
222 213
                 $callchain_description = $this->toString([
223 214
                     'target' => $target,
Please login to merge, or discard this patch.
src/ExportTrait.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
                     ]);
65 65
                 }, $call['arguments']));
66 66
                 $string .= ')';
67
-            }
68
-            else {
67
+            } else {
69 68
                 $string .= '[' . static::varExport($call['entry'], [
70 69
                     'short_objects' => $short_objects, 
71 70
                     'max_length' => $max_param_length,
@@ -105,8 +104,7 @@  discard block
 block discarded – undo
105 104
             if (is_object($variable)) {
106 105
                 // shortening short objects would only slow the workflow
107 106
                 $export = get_class($variable) . ' #' . spl_object_id($variable);
108
-            }
109
-            elseif (is_string($variable)) {
107
+            } elseif (is_string($variable)) {
110 108
                 $keep_length = floor(($options['max_length'] - 5) / 2);
111 109
                 
112 110
                 $export = substr($variable, 0, (int) $keep_length)
Please login to merge, or discard this patch.