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