| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.5923 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 3 | public function setValue($key, $value) |
|
| 39 | { |
||
| 40 | 3 | $value = is_string($value) ? "'{$value}'" : VarDumper::export($value); |
|
| 41 | 3 | $value = "<?php\nreturn {$value};\n"; |
|
| 42 | |||
| 43 | 3 | $result = parent::setValue($key, $value); |
|
| 44 | |||
| 45 | 3 | if (function_exists('opcache_compile_file') && ini_get('opcache.enable')) { |
|
| 46 | $file = $this->getFile($key); |
||
| 47 | @opcache_compile_file($file); |
||
|
1 ignored issue
–
show
|
|||
| 48 | } |
||
| 49 | |||
| 50 | 3 | return $result; |
|
| 51 | } |
||
| 52 | } |
If you suppress an error, we recommend checking for the error condition explicitly: