| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function getAllHavingNoRelations(): iterable |
||
| 41 | { |
||
| 42 | return $this->getEntityManager() |
||
| 43 | ->createQuery( |
||
| 44 | <<<DQL |
||
| 45 | SELECT artist |
||
| 46 | FROM Uxmp\Core\Orm\Model\Artist artist |
||
| 47 | LEFT JOIN Uxmp\Core\Orm\Model\Album album |
||
| 48 | WITH album.artist_id = artist.id |
||
| 49 | GROUP BY artist HAVING COUNT(album.id) = 0 |
||
| 50 | DQL |
||
| 51 | ) |
||
| 52 | ->toIterable(); |
||
| 53 | } |
||
| 55 |