src/Request.php
protected function sanitizeValue($input, Sanitize $sanitize = null)
    {
        if (!isset($sanitize)) {
            $sanitize = $this->sanitize ?: Sanitize::removeTags()->trim()->toType();
        }

        if (is_array($input)) {
            $rawRule = $sanitize->getRawRules();
            $rawRule = current($rawRule);
            if ($rawRule instanceof Attributes) {
                return $sanitize->sanitize($input);
            }
            return Sanitize::attributes($sanitize)->sanitize($input);
        }

        return $sanitize->sanitize($input);
    }
protected function sanitizeValue($input, Sanitize $sanitize = null)
    {
        if (!isset($sanitize)) {
            $sanitize = $this->sanitize ?: Sanitize::removeTags()->trim()->toType();
        }

        if (is_array($input)) {
            $rawRule = $sanitize->getRawRules();
            $rawRule = current($rawRule);
            if ($rawRule instanceof Attributes) {
                return $sanitize->sanitize($input);
            }
            return Sanitize::attributes($sanitize)->sanitize($input);
        }

        return $sanitize->sanitize($input);
    }
protected function sanitizeValue ( $ input , Sanitize $ sanitize = null ) { if ( ! isset ( $ sanitize ) ) { $ sanitize = $ this -> sanitize ? : Sanitize :: removeTags ( ) -> trim ( ) -> toType ( ) ; } if ( is_array ( $ input ) ) { $ rawRule = $ sanitize -> getRawRules ( ) ; $ rawRule = current ( $ rawRule ) ; if ( $ rawRule instanceof Attributes ) { return $ sanitize -> sanitize ( $ input ) ; } return Sanitize :: attributes ( $ sanitize ) -> sanitize ( $ input ) ; } return $ sanitize -> sanitize ( $ input ) ; }
Sanitize request-value.

@param mixed $input
@param Sanitize $sanitize
@return null
Sanitize request - value .