src/Util/Validator.php
protected function validateIn($field, $value, $params)
    {
        $isAssoc = \array_values($params[0]) !== $params[0];
        if ($isAssoc) {
            $params[0] = \array_keys($params[0]);
        }

        $strict = false;
        if (isset($params[1])) {
            $strict = $params[1];
        }

        return \in_array($value, $params[0], $strict);
    }
protected function validateIn($field, $value, $params)
    {
        $isAssoc = \array_values($params[0]) !== $params[0];
        if ($isAssoc) {
            $params[0] = \array_keys($params[0]);
        }

        $strict = false;
        if (isset($params[1])) {
            $strict = $params[1];
        }

        return \in_array($value, $params[0], $strict);
    }
protected function validateIn ( $ field , $ value , $ params ) { $ isAssoc = \ array_values ( $ params [ 0 ] ) !== $ params [ 0 ] ; if ( $ isAssoc ) { $ params [ 0 ] = \ array_keys ( $ params [ 0 ] ) ; } $ strict = false ; if ( isset ( $ params [ 1 ] ) ) { $ strict = $ params [ 1 ] ; } return \ in_array ( $ value , $ params [ 0 ] , $ strict ) ; }
Validate a field is contained within a list of values

@param  string $field
@param  mixed  $value
@param  array  $params

@internal param array $fields
@return bool
Validate a field is contained within a list of values