@@ -98,8 +98,7 @@ discard block |
||
98 | 98 | return var_export($argument, true); |
99 | 99 | }, $call['arguments'])); |
100 | 100 | $string .= ')'; |
101 | - } |
|
102 | - else { |
|
101 | + } else { |
|
103 | 102 | $string .= '[' . var_export($call['entry'], true) . ']'; |
104 | 103 | } |
105 | 104 | } |
@@ -121,30 +120,25 @@ discard block |
||
121 | 120 | } |
122 | 121 | |
123 | 122 | $out = $this->expectedTarget; |
124 | - } |
|
125 | - elseif (is_string($this->expectedTarget)) { |
|
123 | + } elseif (is_string($this->expectedTarget)) { |
|
126 | 124 | if (class_exists($this->expectedTarget)) { |
127 | 125 | if (! $target instanceof $this->expectedTarget) { |
128 | 126 | throw new BadTargetClassException($this, $this->expectedTarget, $target); |
129 | 127 | } |
130 | - } |
|
131 | - elseif (interface_exists($this->expectedTarget)) { |
|
128 | + } elseif (interface_exists($this->expectedTarget)) { |
|
132 | 129 | if (! $target instanceof $this->expectedTarget) { |
133 | 130 | throw new BadTargetInterfaceException($this, $this->expectedTarget, $target); |
134 | 131 | } |
135 | - } |
|
136 | - elseif (type_exists($this->expectedTarget)) { |
|
132 | + } elseif (type_exists($this->expectedTarget)) { |
|
137 | 133 | if (gettype($target) != $this->expectedTarget) { |
138 | 134 | throw new BadTargetTypeException($this, $this->expectedTarget, $target); |
139 | 135 | } |
140 | - } |
|
141 | - else { |
|
136 | + } else { |
|
142 | 137 | throw new UndefinedTargetClassException($this, $this->expectedTarget); |
143 | 138 | } |
144 | 139 | |
145 | 140 | $out = $target; |
146 | - } |
|
147 | - else { |
|
141 | + } else { |
|
148 | 142 | $out = $target; |
149 | 143 | } |
150 | 144 | |
@@ -152,12 +146,10 @@ discard block |
||
152 | 146 | try { |
153 | 147 | if (isset($call['method'])) { |
154 | 148 | $out = call_user_func_array([$out, $call['method']], $call['arguments']); |
155 | - } |
|
156 | - else { |
|
149 | + } else { |
|
157 | 150 | $out = $out[ $call['entry'] ]; |
158 | 151 | } |
159 | - } |
|
160 | - catch (\Exception $e) { |
|
152 | + } catch (\Exception $e) { |
|
161 | 153 | // Throw $e with the good stack (usage exception) |
162 | 154 | throw $e; |
163 | 155 | } |