| Total Complexity | 16 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Coverage | 87.88% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class TypeUtil |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @param string $type |
||
| 22 | * |
||
| 23 | * @return bool |
||
| 24 | */ |
||
| 25 | 1 | public static function isTypeList($type): bool |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $type |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | 1 | public static function isTypeNonNullList($type): bool |
|
| 36 | { |
||
| 37 | 1 | return (bool) preg_match('/^\[([\\\\\w]+)!\]!?$/', $type); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $type |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 1 | public static function isTypeNonNull($type): bool |
|
| 46 | { |
||
| 47 | 1 | return (bool) preg_match('/!$/', $type); |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $type |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 1 | public static function normalize($type) |
|
| 88 | } |
||
| 89 | } |
||
| 90 |