| Conditions | 5 |
| Paths | 5 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | protected function setDimensions(): Terminal |
||
| 36 | { |
||
| 37 | $this->dimensions = new Dimensions(); |
||
| 38 | if (!$this->isWindows()) { |
||
| 39 | $matcher = [0,0,0]; |
||
| 40 | |||
| 41 | //$ttyDims = Process::readFromProcess(self::TTY_DIM_COMMAND_0); |
||
| 42 | //echo $ttyDims;die;*/ |
||
| 43 | //var_dump($ttyDims); |
||
| 44 | $ttyDims = []; |
||
| 45 | if (!empty($ttyDims)) { |
||
| 46 | $matcher = explode(self::_S, self::_S . $ttyDims); |
||
| 47 | } else { |
||
| 48 | $ttyDims = Process::readFromProcess(self::TTY_DIM_COMMAND_1); |
||
| 49 | var_dump($ttyDims); |
||
| 50 | |||
| 51 | if (preg_match('/(\d+)+;.\w{7}.(\d+)+;/', $ttyDims, $matches)) { |
||
| 52 | $matcher = $matches; |
||
| 53 | } elseif (preg_match('/;(\d+).\w{4};.(\d+)/i', $ttyDims, $matches)) { |
||
| 54 | $matcher = $matches; |
||
| 55 | } |
||
| 56 | } |
||
| 57 | var_dump($matcher, $ttyDims); |
||
| 58 | $this->dimensions->set((int) $matcher[2], (int) $matcher[1]); |
||
| 59 | } |
||
| 60 | return $this; |
||
| 61 | } |
||
| 73 |
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