Skip to content

Commit

Permalink
use inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng committed Sep 25, 2017
1 parent 825b454 commit 5c46f8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Database/Query.php
Expand Up @@ -1264,8 +1264,7 @@ public function orHaving($conditions, $types = [])
public function page($num, $limit = null)
{
if ($num < 1) {
$msg = 'Pages should start at 1.';
throw new InvalidArgumentException($msg);
throw new InvalidArgumentException('Pages should start at 1.');
}
if ($limit !== null) {
$this->limit($limit);
Expand Down
3 changes: 1 addition & 2 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -2217,8 +2217,7 @@ public function testPageShouldStartAtOne()
{
$this->loadFixtures('Comments');
$query = new Query($this->connection);
$result = $query->from('comments')
->page(0);
$result = $query->from('comments')->page(0);
}

/**
Expand Down

0 comments on commit 5c46f8b

Please sign in to comment.