sroehrl/php-i18n-translate

View on GitHub

Showing 2 of 3 total issues

Method formatWithIntl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function formatWithIntl(string $what): Closure
    {
        switch ($what) {
            case 'number':
                $fmt = new NumberFormatter($this->locale, NumberFormatter::DECIMAL);
Severity: Minor
Found in src/Formatter.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                return "[%$function%](%$result%)";
    Severity: Major
    Found in src/Translate.php - About 30 mins to fix
      Severity
      Category
      Status
      Source
      Language