Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function runExample(ExampleObj $example): OutcomeInterface |
||
33 | { |
||
34 | $filename = (string)tempnam(sys_get_temp_dir(), 'readmetester'); |
||
35 | |||
36 | file_put_contents($filename, "<?php {$example->getCodeBlock()->getCode()}"); |
||
37 | |||
38 | $process = new PhpProcess("<?php {$this->bootstrap} require '$filename';"); |
||
39 | $process->run(); |
||
40 | |||
41 | unlink($filename); |
||
42 | |||
43 | if ($errorOutput = $process->getErrorOutput()) { |
||
44 | return new ErrorOutcome($example, trim($errorOutput)); |
||
45 | } |
||
46 | |||
47 | if ($output = $process->getOutput()) { |
||
48 | return new OutputOutcome($example, $output); |
||
49 | } |
||
50 | |||
51 | return new VoidOutcome($example); |
||
52 | } |
||
54 |
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