Browse Source

should => must

saeid 8 years ago
parent
commit
be5cb6fb32

+ 2 - 2
src/Database/Query.php

@@ -1253,7 +1253,7 @@ class Query implements ExpressionInterface, IteratorAggregate
      * in the record set you want as results. If empty the limit will default to
      * the existing limit clause, and if that too is empty, then `25` will be used.
      *
-     * Pages should start at 1.
+     * Pages must start at 1.
      *
      * @param int $num The page number you want.
      * @param int|null $limit The number of rows you want in the page. If null
@@ -1264,7 +1264,7 @@ class Query implements ExpressionInterface, IteratorAggregate
     public function page($num, $limit = null)
     {
         if ($num < 1) {
-            throw new InvalidArgumentException('Pages should start at 1.');
+            throw new InvalidArgumentException('Pages must start at 1.');
         }
         if ($limit !== null) {
             $this->limit($limit);

+ 1 - 1
src/Datasource/QueryInterface.php

@@ -234,7 +234,7 @@ interface QueryInterface
      * in the record set you want as results. If empty the limit will default to
      * the existing limit clause, and if that too is empty, then `25` will be used.
      *
-     * Pages should start at 1.
+     * Pages must start at 1.
      *
      * @param int $num The page number you want.
      * @param int|null $limit The number of rows you want in the page. If null

+ 1 - 1
tests/TestCase/Database/QueryTest.php

@@ -2210,7 +2210,7 @@ class QueryTest extends TestCase
      * Test Pages number.
      *
      * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Pages should start at 1.
+     * @expectedExceptionMessage Pages must start at 1.
      * @return void
      */
     public function testPageShouldStartAtOne()