abbadon1334/atk4-i18next-php

View on GitHub
src/I18Next/Locale/Processor/Key/KeyPlural.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace I18Next\Locale\Processor\Key;

final class KeyPlural extends AbstractProcessorKey
{
    /**
     * {@inheritdoc}
     */
    public static function willBeProcessed(string $key): bool
    {
        if ('plural' !== $key) {
            return false;
        }

        return true;
    }

    /**
     * {@inheritdoc}
     */
    protected function process(): void
    {
        $this->results[$this->getKeyCleared().'/2'] = $this->value;
    }
}