Skip to content

Commit

Permalink
Adds clarifying language around pluralize and singularize
Browse files Browse the repository at this point in the history
Adds a note to clarify that pluralize and singularize while in general will work with most English nouns, it is possible for them to have issues around singularizing a singular noun and same with pluralizing a plural noun.

Related CakePHP Core Issue that brought forth this change: cakephp/cakephp#6236 (comment)
  • Loading branch information
justinyost committed Apr 1, 2015
1 parent adf7d3b commit 6519ac4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions en/core-utility-libraries/inflector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ You can try out the inflections online at `inflector.cakephp.org <http://inflect
* **Input:** Apple, Orange, Person, Man
* **Output:** Apples, Oranges, People, Men

.. note::

``pluralize()`` may not always correctly convert a noun that is already in it's plural form.

.. php:staticmethod:: singularize($plural)
* **Input:** Apples, Oranges, People, Men
* **Output:** Apple, Orange, Person, Man

.. note::

``singularize()`` may not always correctly convert a noun that is already in it's singular form.

.. php:staticmethod:: camelize($underscored)
* **Input:** Apple\_pie, some\_thing, people\_person
Expand Down

0 comments on commit 6519ac4

Please sign in to comment.