protected function resolveCasts(array $options = [])
    {
        /* Create a copy of the options to work on. */
        $castOptions = $options;

        /* Iterate every options and cast as needed. */
        foreach ($options as $option => $value) {

            /* No cast was defined, continue. */
            if (! isset($this->casts[$option])) {

                continue;
            }
            $type = $this->casts[$option];

            $castOptions[$option] = ($type instanceof \Closure)
                ? $type($value)
                : $this->castToType($value, $type);
        }

        return $castOptions;
    }
protected function resolveCasts(array $options = [])
    {
        /* Create a copy of the options to work on. */
        $castOptions = $options;

        /* Iterate every options and cast as needed. */
        foreach ($options as $option => $value) {

            /* No cast was defined, continue. */
            if (! isset($this->casts[$option])) {

                continue;
            }
            $type = $this->casts[$option];

            $castOptions[$option] = ($type instanceof \Closure)
                ? $type($value)
                : $this->castToType($value, $type);
        }

        return $castOptions;
    }
protected function resolveCasts ( array $ options = [ ] ) { /* Create a copy of the options to work on. */ $ castOptions = $ options ; /* Iterate every options and cast as needed. */ foreach ( $ options as $ option => $ value ) { /* No cast was defined, continue. */ if ( ! isset ( $ this -> casts [ $ option ] ) ) { continue ; } $ type = $ this -> casts [ $ option ] ; $ castOptions [ $ option ] = ( $ type instanceof \ Closure ) ? $ type ( $ value ) : $ this -> castToType ( $ value , $ type ) ; } return $ castOptions ; }
Resolves a variable casts in the initial options.

@param array $options Options to cast.

@return array Options after applying the relevant casts.
Resolves a variable casts in the initial options .