| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 37 | public function checkStatus(): Result |
||
| 38 | { |
||
| 39 | $result = new Result($this->label); |
||
| 40 | |||
| 41 | $phpVersion = $this->getPhpVersion(); |
||
| 42 | if (null !== $this->greaterEquals && !version_compare($this->greaterEquals, $phpVersion, '<=')) { |
||
| 43 | $result->setError("PHP version must be >= {$this->greaterEquals}; is ".$phpVersion); |
||
| 44 | } |
||
| 45 | |||
| 46 | if (null !== $this->lessThan && !version_compare($this->lessThan, $phpVersion, '>')) { |
||
| 47 | $result->setError("PHP version must be < {$this->lessThan}; is ".$phpVersion); |
||
| 48 | } |
||
| 49 | |||
| 50 | return $result; |
||
| 51 | } |
||
| 53 |