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');
        }
    }