Skip to content

Commit a5a0974

Browse files
committed
Remove unnecessary method call
The `select` and `from` methods are optional
1 parent 306c466 commit a5a0974

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AppBundle/Repository/PostRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function findLatest($limit = Post::NUM_ITEMS)
2828
{
2929
return $this
3030
->createQueryBuilder('p')
31-
->select('p')
32-
->where('p.publishedAt <= :now')->setParameter('now', new \DateTime())
31+
->where('p.publishedAt <= :now')
32+
->setParameter('now', new \DateTime())
3333
->orderBy('p.publishedAt', 'DESC')
3434
->setMaxResults($limit)
3535
->getQuery()

0 commit comments

Comments
 (0)