src/Argument/Argument.php
protected function setCastTo($castTo)
    {
        if (!in_array($castTo, ['string', 'int', 'float', 'bool'])) {
            throw new UnexpectedValueException(
                "An argument may only be cast to the data type "
                . "'string', 'int', 'float', or 'bool'."
            );
        }

        $this->castTo = $this->noValue() ? 'bool' : $castTo;
    }
protected function setCastTo($castTo)
    {
        if (!in_array($castTo, ['string', 'int', 'float', 'bool'])) {
            throw new UnexpectedValueException(
                "An argument may only be cast to the data type "
                . "'string', 'int', 'float', or 'bool'."
            );
        }

        $this->castTo = $this->noValue() ? 'bool' : $castTo;
    }
protected function setCastTo ( $ castTo ) { if ( ! in_array ( $ castTo , [ 'string' , 'int' , 'float' , 'bool' ] ) ) { throw new UnexpectedValueException ( "An argument may only be cast to the data type " . "'string', 'int', 'float', or 'bool'." ) ; } $ this -> castTo = $ this -> noValue ( ) ? 'bool' : $ castTo ; }
Set the data type to cast an argument's value to.

Valid data types are "string", "int", "float", and "bool".

@param string $castTo

@return void
@throws UnexpectedValueException if $castTo is not a valid data type.
Set the data type to cast an argument s value to .