Conditions | 6 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | protected function analyse(array $context) |
||
22 | { |
||
23 | $replace = []; |
||
24 | $attach =[] ; |
||
25 | foreach ($context as $key => $val) { |
||
26 | if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString')) && ! $val instanceof \Exception) { |
||
27 | $replace['{' . $key . '}'] = $val; |
||
28 | } else { |
||
29 | $attach[$key] = $val; |
||
30 | } |
||
31 | } |
||
32 | return [$attach, $replace]; |
||
33 | } |
||
58 |