| Total Complexity | 9 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class AssertUtils |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param iterable|string[] $elements |
||
| 11 | * |
||
| 12 | * @return bool |
||
| 13 | */ |
||
| 14 | 24 | public static function hasNonStrings(iterable $elements): bool |
|
| 15 | { |
||
| 16 | 24 | foreach ($elements as $string) { |
|
| 17 | 24 | if (!\is_string($string)) { |
|
| 18 | 24 | return true; |
|
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | 24 | return false; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $string |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | 26 | public static function isNotEmpty(string $string): bool |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param null|string $string |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 8 | public static function isNumericOrNull(?string $string): bool |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param null[]|string[] ...$arguments |
||
| 47 | * |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 6 | public static function isAtLeastOneArgumentNotNull(?string ...$arguments): bool |
|
| 59 | } |
||
| 60 | } |
||
| 61 |