Conditions | 4 |
Paths | 8 |
Total Lines | 36 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | function dumprr(mixed $value, mixed ...$values): mixed |
||
16 | { |
||
17 | $previous = $_SERVER['VAR_DUMPER_FORMAT'] ?? false; |
||
18 | unset($_SERVER['VAR_DUMPER_FORMAT']); |
||
19 | |||
20 | if (!\defined('STDERR')) { |
||
21 | \define('STDERR', \fopen('php://stderr', 'wb')); |
||
22 | } |
||
23 | static $dumper = new CliDumper(STDERR); |
||
24 | |||
25 | // |
||
26 | // Output modifiers |
||
27 | // |
||
28 | $cloner = new VarCloner(); |
||
29 | // remove File and Line definitions from a custom closure dump |
||
30 | /** @psalm-suppress InvalidArgument */ |
||
31 | $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); |
||
32 | |||
33 | // Set new handler and store previous one |
||
34 | $prevent = VarDumper::setHandler( |
||
35 | static fn (mixed $value): ?string => $dumper->dump($cloner->cloneVar($value)), |
||
36 | ); |
||
37 | $result = VarDumper::dump($value); |
||
38 | |||
39 | foreach ($values as $v) { |
||
40 | VarDumper::dump($v); |
||
41 | } |
||
42 | |||
43 | // Reset handler |
||
44 | VarDumper::setHandler($prevent); |
||
45 | |||
46 | if ($previous) { |
||
47 | $_SERVER['VAR_DUMPER_FORMAT'] = $previous; |
||
48 | } |
||
49 | |||
50 | return $result; |
||
51 | } |
||
53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths