src/ProxyManager/Generator/Util/IdentifierSuffixer.php
public static function getIdentifier(string $name) : string
    {
        static $salt;

        $salt   = $salt ?? $salt = self::loadBaseHashSalt();
        $suffix = substr(sha1($name . $salt), 0, 5);

        if (! preg_match(self::VALID_IDENTIFIER_FORMAT, $name)) {
            return self::DEFAULT_IDENTIFIER . $suffix;
        }

        return $name . $suffix;
    }
public static function getIdentifier(string $name) : string
    {
        static $salt;

        $salt   = $salt ?? $salt = self::loadBaseHashSalt();
        $suffix = substr(sha1($name . $salt), 0, 5);

        if (! preg_match(self::VALID_IDENTIFIER_FORMAT, $name)) {
            return self::DEFAULT_IDENTIFIER . $suffix;
        }

        return $name . $suffix;
    }
public static function getIdentifier ( string $ name ) : string { static $ salt ; $ salt = $ salt ?? $ salt = self :: loadBaseHashSalt ( ) ; $ suffix = substr ( sha1 ( $ name . $ salt ) , 0 , 5 ) ; if ( ! preg_match ( self :: VALID_IDENTIFIER_FORMAT , $ name ) ) { return self :: DEFAULT_IDENTIFIER . $ suffix ; } return $ name . $ suffix ; }
Generates a valid unique identifier from the given name,
with a suffix attached to it
Generates a valid unique identifier from the given name with a suffix attached to it