protected static function getRatingByStringIdentifier(string $identifier): int
    {
        switch ($identifier) {
            case 's':
                return PostInterface::RATING_SAFE;

            case 'q':
                return PostInterface::RATING_QUESTIONABLE;

            case 'e':
                return PostInterface::RATING_EXPLICIT;

            default:
                throw new InvalidArgumentException('Unknown rating identifier');
        }
    }
protected static function getRatingByStringIdentifier(string $identifier): int
    {
        switch ($identifier) {
            case 's':
                return PostInterface::RATING_SAFE;

            case 'q':
                return PostInterface::RATING_QUESTIONABLE;

            case 'e':
                return PostInterface::RATING_EXPLICIT;

            default:
                throw new InvalidArgumentException('Unknown rating identifier');
        }
    }
protected static function getRatingByStringIdentifier ( string $ identifier ) : int { switch ( $ identifier ) { case 's' : return PostInterface :: RATING_SAFE ; case 'q' : return PostInterface :: RATING_QUESTIONABLE ; case 'e' : return PostInterface :: RATING_EXPLICIT ; default : throw new InvalidArgumentException ( 'Unknown rating identifier' ) ; } }
Converts API rating identifier to constant value.

@param string $identifier

@return int
Converts API rating identifier to constant value .