| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class IsInArray extends ValidatorImpl |
||
| 17 | { |
||
| 18 | public const ERROR_MULTI_DIMENSIONAL = "Array must not be multi dimensional"; |
||
| 19 | public const ERROR_NO_ARRAY_DEFINED = "No haystack array defined"; |
||
| 20 | /** @var array */ |
||
| 21 | protected $haystack; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param null $value |
||
|
|
|||
| 25 | * @return bool |
||
| 26 | * @throws ValidationException |
||
| 27 | */ |
||
| 28 | public function check($value = null): bool |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param array $array |
||
| 42 | * |
||
| 43 | * @return $this |
||
| 44 | * @throws ValidationException |
||
| 45 | */ |
||
| 46 | public function haystack(array $array): IsInArray |
||
| 58 |