| Conditions | 3 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 6 | public function exec($command, &$exitCode = null) |
|
| 24 | { |
||
| 25 | 6 | $writeBinn = new BinnList; |
|
| 26 | |||
| 27 | 6 | $writeBinn->addUint8(self::COMMAND_EXEC); |
|
| 28 | 6 | $writeBinn->addStr($command); |
|
| 29 | //$writeBinn->addUint8($timeout); // Options |
||
| 30 | |||
| 31 | 6 | $read = $this->writeAndReadSocket($writeBinn->serialize()); |
|
| 32 | |||
| 33 | 6 | $readBinn = new BinnList; |
|
| 34 | 6 | $readBinn->binnOpen($read); |
|
| 35 | 6 | $results = $readBinn->unserialize(); |
|
| 36 | |||
| 37 | 6 | if ($results[0] != self::STATUS_OK) { |
|
| 38 | 3 | throw new RuntimeException('Execute command error: ' . isset($results[1]) ? $results[1] : 'Unknown'); |
|
| 39 | } |
||
| 40 | |||
| 41 | 3 | $exitCode = $results[1]; |
|
| 42 | |||
| 43 | // Return command execute results |
||
| 44 | 3 | return $results[2]; |
|
| 45 | } |
||
| 46 | } |
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