Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function postExists(Ulid $postId): bool |
||
36 | { |
||
37 | 2 | $headerClass = CommentPostHeader::class; |
|
38 | $query = $this->getEntityManager()->createQuery( |
||
39 | 2 | "select count(p.id) as count from $headerClass p where p.id = :id" |
|
40 | 2 | ); |
|
41 | 2 | return $query |
|
42 | ->setParameter("id", $postId, "ulid") |
||
43 | ->getResult()[0]["count"] > 0; |
||
44 | } |
||
45 | } |