| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | public function findAllWithLocale($locale) |
||
| 11 | { |
||
| 12 | return $this |
||
| 13 | ->getEntityManager() |
||
| 14 | ->createQueryBuilder('n') |
||
| 15 | ->andWhere('n.published = true') |
||
| 16 | ->andWhere('n.locale = :locale') |
||
| 17 | ->setParameter('locale', $locale) |
||
| 18 | ->orderBy('n.position', 'ASC') |
||
| 19 | ->getQuery() |
||
| 20 | ->getResult(); |
||
| 21 | } |
||
| 22 | |||
| 50 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.