Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | public function encode($value, $depth, array $options, callable $encode) |
||
33 | { |
||
34 | $reflection = new ReflectionClosure($value); |
||
35 | $variables = $reflection->getStaticVariables(); |
||
36 | $config = $variables['config']; |
||
37 | |||
38 | return str_replace( |
||
39 | ['$config'], |
||
40 | ["'$config.php'"], |
||
41 | substr( |
||
42 | $reflection->getCode(), |
||
43 | 16 |
||
44 | ), |
||
48 |