src/precore/util/Objects.php
public static function toStringHelper($identifier) : ToStringHelper
    {
        Preconditions::checkArgument(
            is_object($identifier) || is_string($identifier),
            'An object, a string, or a ReflectionClass must be used as identifier'
        );
        $name = null;
        if ($identifier instanceof ReflectionClass) {
            $name = $identifier->getName();
        } elseif (is_object($identifier)) {
            $name = get_class($identifier);
        } elseif (is_string($identifier)) {
            $name = $identifier;
        }
        return new ToStringHelper($name);
    }
public static function toStringHelper($identifier) : ToStringHelper
    {
        Preconditions::checkArgument(
            is_object($identifier) || is_string($identifier),
            'An object, a string, or a ReflectionClass must be used as identifier'
        );
        $name = null;
        if ($identifier instanceof ReflectionClass) {
            $name = $identifier->getName();
        } elseif (is_object($identifier)) {
            $name = get_class($identifier);
        } elseif (is_string($identifier)) {
            $name = $identifier;
        }
        return new ToStringHelper($name);
    }
public static function toStringHelper ( $ identifier ) : ToStringHelper { Preconditions :: checkArgument ( is_object ( $ identifier ) || is_string ( $ identifier ) , 'An object, a string, or a ReflectionClass must be used as identifier' ) ; $ name = null ; if ( $ identifier instanceof ReflectionClass ) { $ name = $ identifier -> getName ( ) ; } elseif ( is_object ( $ identifier ) ) { $ name = get_class ( $ identifier ) ; } elseif ( is_string ( $ identifier ) ) { $ name = $ identifier ; } return new ToStringHelper ( $ name ) ; }
Creates an instance of ToStringHelper.
This is helpful for implementing ObjectInterface::toString().

@param $identifier
@throws \InvalidArgumentException
@return ToStringHelper
Creates an instance of ToStringHelper . This is helpful for implementing ObjectInterface :: toString () .