Browse Source

Merge pull request #15736 from cakephp/database-param-name

Rename arguments.
othercorey 4 years ago
parent
commit
2ed9d68788
2 changed files with 10 additions and 10 deletions
  1. 6 6
      src/Database/Query.php
  2. 4 4
      src/Datasource/QueryInterface.php

+ 6 - 6
src/Database/Query.php

@@ -1523,13 +1523,13 @@ class Query implements ExpressionInterface, IteratorAggregate
      * $query->limit($query->newExpr()->add(['1 + 1'])); // LIMIT (1 + 1)
      * ```
      *
-     * @param \Cake\Database\ExpressionInterface|int|null $num number of records to be returned
+     * @param \Cake\Database\ExpressionInterface|int|null $limit number of records to be returned
      * @return $this
      */
-    public function limit($num)
+    public function limit($limit)
     {
         $this->_dirty();
-        $this->_parts['limit'] = $num;
+        $this->_parts['limit'] = $limit;
 
         return $this;
     }
@@ -1549,13 +1549,13 @@ class Query implements ExpressionInterface, IteratorAggregate
      * $query->offset($query->newExpr()->add(['1 + 1'])); // OFFSET (1 + 1)
      * ```
      *
-     * @param \Cake\Database\ExpressionInterface|int|null $num number of records to be skipped
+     * @param \Cake\Database\ExpressionInterface|int|null $offset number of records to be skipped
      * @return $this
      */
-    public function offset($num)
+    public function offset($offset)
     {
         $this->_dirty();
-        $this->_parts['offset'] = $num;
+        $this->_parts['offset'] = $offset;
 
         return $this;
     }

+ 4 - 4
src/Datasource/QueryInterface.php

@@ -172,10 +172,10 @@ interface QueryInterface
      * $query->limit($query->newExpr()->add(['1 + 1'])); // LIMIT (1 + 1)
      * ```
      *
-     * @param \Cake\Database\ExpressionInterface|int|null $num number of records to be returned
+     * @param \Cake\Database\ExpressionInterface|int|null $limit number of records to be returned
      * @return $this
      */
-    public function limit($num);
+    public function limit($limit);
 
     /**
      * Sets the number of records that should be skipped from the original result set
@@ -192,10 +192,10 @@ interface QueryInterface
      *  $query->offset($query->newExpr()->add(['1 + 1'])); // OFFSET (1 + 1)
      * ```
      *
-     * @param \Cake\Database\ExpressionInterface|int|null $num number of records to be skipped
+     * @param \Cake\Database\ExpressionInterface|int|null $offset number of records to be skipped
      * @return $this
      */
-    public function offset($num);
+    public function offset($offset);
 
     /**
      * Adds a single or multiple fields to be used in the ORDER clause for this query.