public function castString()
    {
        $castFunction = function ($value) {
            return is_array($value) ? 'Array' : (string) $value;
        };

        if (is_string($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'string');
    }
public function castString()
    {
        $castFunction = function ($value) {
            return is_array($value) ? 'Array' : (string) $value;
        };

        if (is_string($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'string');
    }
public function castString ( ) { $ castFunction = function ( $ value ) { return is_array ( $ value ) ? 'Array' : ( string ) $ value ; } ; if ( is_string ( $ this -> value ) ) { return $ castFunction ( $ this -> value ) ; } return $ this -> handleMismatch ( $ castFunction , 'string' ) ; }
Casts the value to string.

@return string
Casts the value to string .