Total Complexity | 6 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class NestedTypeParanoia extends TypeParanoia |
||
12 | { |
||
13 | /** |
||
14 | * @param mixed $needle |
||
15 | * |
||
16 | * @return int|null |
||
17 | */ |
||
18 | 30 | public static function MaybeFoundInArray($needle, array $haystack) |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param mixed $object |
||
30 | */ |
||
31 | 78 | public static function ThrowIfNotNestedType( |
|
45 | ); |
||
46 | 77 | } |
|
47 | |||
48 | /** |
||
49 | * @param mixed $object |
||
50 | */ |
||
51 | 58 | public static function ThrowIfNotWriteableNestedType( |
|
52 | $object, |
||
53 | int $argument, |
||
54 | string $class, |
||
55 | string $function, |
||
56 | string ...$types |
||
57 | ) { |
||
58 | 58 | static::ThrowIfNotType( |
|
59 | 58 | $object, |
|
60 | 58 | $argument, |
|
61 | 58 | $class, |
|
62 | 58 | $function, |
|
63 | 58 | DaftNestedWriteableObject::class, |
|
64 | 58 | ...$types |
|
65 | ); |
||
66 | 56 | } |
|
67 | |||
68 | /** |
||
69 | * @param mixed $maybe |
||
70 | */ |
||
71 | 60 | public static function ForceInt($maybe) : int |
|
74 | } |
||
75 | } |
||
76 |