Permalink
Browse files

Fixed typos and other problems in doc blocks

  • Loading branch information...
1 parent 4ffa638 commit 56ff48db8397260e04425d04fa0e07c7af8b1d9b @lorenzo lorenzo committed Jan 20, 2014
Showing with 7 additions and 7 deletions.
  1. +2 −2 src/Collection/CollectionTrait.php
  2. +1 −1 src/Model/Behavior/CounterCacheBehavior.php
  3. +4 −4 src/ORM/Query.php
@@ -629,9 +629,9 @@ public function append($items) {
}
/**
- * Returrns a new collection where the values extracted based on a value path
+ * Returns a new collection where the values extracted based on a value path
* and then indexed by a key path. Optionally this method can produce parent
- * groups absed on a group property path.
+ * groups based on a group property path.
*
* ### Examples:
*
@@ -84,7 +84,7 @@ class CounterCacheBehavior extends Behavior {
* Keeping a reference to the table in order to,
* be able to retrieve associations and fetch records for counting.
*
- * @var array
+ * @var \Cake\ORM\Table
*/
protected $_table;
View
@@ -800,7 +800,7 @@ public function mapReduce(callable $mapper = null, callable $reducer = null, $ov
* are tried to be fetched from the database.
*
* Formatting callbacks will get as first parameter a `ResultSetDecorator` that
- * can be traversed and modified at will. AS second parameter, the formatting
+ * can be traversed and modified at will. As the second parameter, the formatting
* callback will receive this query instance.
*
* Callbacks are required to return an iterator object, which will be used as
@@ -810,8 +810,8 @@ public function mapReduce(callable $mapper = null, callable $reducer = null, $ov
* If the first argument is set to null, it will return the list of previously
* registered map reduce routines.
*
- * If the second argument is set to true, it will erase previous map reducers
- * and replace it with the arguments passed.
+ * If the second argument is set to true, it will erase previous formatters
+ * and replace them with the passed first argument.
*
* ### Example:
*
@@ -822,7 +822,7 @@ public function mapReduce(callable $mapper = null, callable $reducer = null, $ov
* });
*
* //Add a new column to the ResultSet
- * $query->select(['id', 'name'])->formatResults(function($results, $query) {
+ * $query->select(['name', 'bith_date'])->formatResults(function($results, $query) {
@kicaj

kicaj Jan 20, 2014

Contributor

Should be 'birth_date' instead of 'bith_date'

* return $results->map(function($row) {
* $row['age'] = $row['birth_date']->diff(new DateTime)->y;
* return $row;

0 comments on commit 56ff48d

Please sign in to comment.