src/String/StringTools.php
public static function makePlural($singular)
    {
        $singulars = [
            'ey' => 'eys',
            'day' => 'days',
            "ch" => "ches",
            "s" => "ses",
            "x" => "xes",
            "y" => "ies",
        ];

        foreach ($singulars as $singularEnding => $pluralEnding) {
            if (preg_match("/" . $singularEnding . "$/i", $singular)) {
                return preg_replace("/" . $singularEnding . "$/i", $pluralEnding, $singular);
            }
        }

        return $singular . "s";
    }
public static function makePlural($singular)
    {
        $singulars = [
            'ey' => 'eys',
            'day' => 'days',
            "ch" => "ches",
            "s" => "ses",
            "x" => "xes",
            "y" => "ies",
        ];

        foreach ($singulars as $singularEnding => $pluralEnding) {
            if (preg_match("/" . $singularEnding . "$/i", $singular)) {
                return preg_replace("/" . $singularEnding . "$/i", $pluralEnding, $singular);
            }
        }

        return $singular . "s";
    }
public static function makePlural ( $ singular ) { $ singulars = [ 'ey' => 'eys' , 'day' => 'days' , "ch" => "ches" , "s" => "ses" , "x" => "xes" , "y" => "ies" , ] ; foreach ( $ singulars as $ singularEnding => $ pluralEnding ) { if ( preg_match ( "/" . $ singularEnding . "$/i" , $ singular ) ) { return preg_replace ( "/" . $ singularEnding . "$/i" , $ pluralEnding , $ singular ) ; } } return $ singular . "s" ; }
Returns the English plural form of a singular word.

@param $singular

@return mixed|string
Returns the English plural form of a singular word .