| Total Complexity | 9 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Types |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @return Closure |
||
| 17 | */ |
||
| 18 | 18 | public static function string(): Closure |
|
| 19 | { |
||
| 20 | 18 | return Utils::createClosureFromCallable('is_string'); |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return Closure |
||
| 25 | */ |
||
| 26 | 12 | public static function int(): Closure |
|
| 27 | { |
||
| 28 | 12 | return Utils::createClosureFromCallable('is_int'); |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return Closure |
||
| 33 | */ |
||
| 34 | 6 | public static function float(): Closure |
|
| 35 | { |
||
| 36 | 6 | return Utils::createClosureFromCallable('is_float'); |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return Closure |
||
| 41 | */ |
||
| 42 | 2 | public static function boolean(): Closure |
|
| 43 | { |
||
| 44 | 2 | return Utils::createClosureFromCallable('is_bool'); |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return Closure |
||
| 49 | */ |
||
| 50 | 2 | public static function array(): Closure |
|
| 51 | { |
||
| 52 | 2 | return Utils::createClosureFromCallable('is_array'); |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return Closure |
||
| 57 | */ |
||
| 58 | 2 | public static function callable(): Closure |
|
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return Closure |
||
| 65 | */ |
||
| 66 | 2 | public static function object(): Closure |
|
| 67 | { |
||
| 68 | 2 | return Utils::createClosureFromCallable('is_object'); |
|
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return Closure |
||
| 73 | */ |
||
| 74 | 2 | public static function numeric(): Closure |
|
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @param string $class |
||
| 81 | * |
||
| 82 | * @return Closure |
||
| 83 | */ |
||
| 84 | public static function instanceof(string $class): Closure |
||
| 91 | } |