src/Util/Validator.php
protected function validateSubset($field, $value, $params)
    {
        if (!isset($params[0])) {
            return false;
        }
        if (!\is_array($params[0])) {
            $params[0] = [$params[0]];
        }
        if (\is_scalar($value)) {
            return $this->validateIn($field, $value, $params);
        }
        $intersect = \array_intersect($value, $params[0]);

        return \array_diff($value, $intersect) === \array_diff($intersect, $value);
    }
protected function validateSubset($field, $value, $params)
    {
        if (!isset($params[0])) {
            return false;
        }
        if (!\is_array($params[0])) {
            $params[0] = [$params[0]];
        }
        if (\is_scalar($value)) {
            return $this->validateIn($field, $value, $params);
        }
        $intersect = \array_intersect($value, $params[0]);

        return \array_diff($value, $intersect) === \array_diff($intersect, $value);
    }
protected function validateSubset ( $ field , $ value , $ params ) { if ( ! isset ( $ params [ 0 ] ) ) { return false ; } if ( ! \ is_array ( $ params [ 0 ] ) ) { $ params [ 0 ] = [ $ params [ 0 ] ] ; } if ( \ is_scalar ( $ value ) ) { return $ this -> validateIn ( $ field , $ value , $ params ) ; } $ intersect = \ array_intersect ( $ value , $ params [ 0 ] ) ; return \ array_diff ( $ value , $ intersect ) === \ array_diff ( $ intersect , $ value ) ; }
Validate that all field values contains a given array

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

@return bool
Validate that all field values contains a given array