src/NormalizeStringCapableTrait.php
protected function _normalizeString($subject)
    {
        if ($subject instanceof Stringable) {
            return $subject->__toString();
        }

        if (is_scalar($subject)) {
            return (string) $subject;
        }

        throw $this->_createInvalidArgumentException($this->__('Not a stringable value'), null, null, $subject);
    }
protected function _normalizeString($subject)
    {
        if ($subject instanceof Stringable) {
            return $subject->__toString();
        }

        if (is_scalar($subject)) {
            return (string) $subject;
        }

        throw $this->_createInvalidArgumentException($this->__('Not a stringable value'), null, null, $subject);
    }
protected function _normalizeString ( $ subject ) { if ( $ subject instanceof Stringable ) { return $ subject -> __toString ( ) ; } if ( is_scalar ( $ subject ) ) { return ( string ) $ subject ; } throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Not a stringable value' ) , null , null , $ subject ) ; }
Normalizes a value to its string representation.

The values that can be normalized are any scalar values, as well as
{@see StringableInterface).

@since [*next-version*]

@param Stringable|string|int|float|bool $subject The value to normalize to string.

@throws InvalidArgumentException If the value cannot be normalized.

@return string The string that resulted from normalization.
Normalizes a value to its string representation .