| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 13 | private function validateDirection(string $direction): void |
|
| 51 | { |
||
| 52 | 13 | $availableDirections = [self::ASC, self::DESC]; |
|
| 53 | |||
| 54 | 13 | if(! in_array($direction, $availableDirections)) |
|
| 55 | { |
||
| 56 | 1 | throw new \InvalidArgumentException(sprintf('Unsupported ORDER BY direction "%s"', $direction)); |
|
| 57 | } |
||
| 58 | 12 | } |
|
| 59 | } |
||
| 60 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.