| Conditions | 3 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function format($shouldBreakString) |
||
| 24 | { |
||
| 25 | if (true === $shouldBreakString) { |
||
| 26 | return sprintf( |
||
| 27 | '".call_user_func_array(%s, [%s])."', |
||
| 28 | $this->callable, |
||
| 29 | join(',', array_map(function ($argument) { |
||
| 30 | if ('$' === $argument[0]) { |
||
| 31 | return $argument; |
||
| 32 | } else { |
||
| 33 | return sprintf('"%s"', $argument); |
||
| 34 | } |
||
| 35 | }, $this->arguments)) |
||
| 36 | ); |
||
| 37 | } else { |
||
| 38 | return sprintf( |
||
| 39 | 'call_user_func_array(%s, [%s])', |
||
| 40 | $this->callable, |
||
| 41 | join(',', $this->arguments) |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |