fuel/core — pull request #1218 by thomasedwards (2012-11-22 23:24:40+00:00)
Title: Added count to Inflector::pluralize

I thought of this today and I seemed to write a lot of unnecessary code just to get this to work.

Current situation:

~~~
echo $count.' ';
echo ($count > 1) ? 'people' : 'person';
~~~

or if you use Inflector::pluralize

~~~
echo $count.' ';
$entity = 'person';
echo ($count > 1) ? Inflector::pluralize($entity) : $entity;
~~~

However, this is what I’m proposing:

~~~
echo $count.' '.Inflector::pluralize('person', $count);
~~~

And it’ll simply return it if the second parameter is 1.