We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 7 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function validate($input) |
||
| 26 | { |
||
| 27 | $count = count($input); |
||
| 28 | if ($count < 2) { |
||
| 29 | return true; |
||
| 30 | } |
||
| 31 | for ($i = 1; $i < $count; $i++) { |
||
| 32 | if ( |
||
| 33 | ($this->ascending && ($this->fn)($input[$i]) < ($this->fn)($input[$i - 1])) |
||
| 34 | || (!$this->ascending && ($this->fn)($input[$i]) > ($this->fn)($input[$i - 1])) |
||
| 35 | ) { |
||
| 36 | return false; |
||
| 37 | }; |
||
| 38 | } |
||
| 39 | return true; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |