@@ 62-70 (lines=9) @@ | ||
59 | $this->persistenceService = $persistenceService; |
|
60 | } |
|
61 | ||
62 | public function find(PostId $id): Post |
|
63 | { |
|
64 | $dqlQuery = $this->dqlQueryBuilder->create(Post::class) |
|
65 | ->where('Post.id = :id') |
|
66 | ->setParameter('id', $id) |
|
67 | ->build(); |
|
68 | ||
69 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
70 | } |
|
71 | ||
72 | public function findBySlug(string $slug): Post |
|
73 | { |
|
@@ 72-80 (lines=9) @@ | ||
69 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
70 | } |
|
71 | ||
72 | public function findBySlug(string $slug): Post |
|
73 | { |
|
74 | $dqlQuery = $this->dqlQueryBuilder->create(Post::class) |
|
75 | ->where('Post.slug = :slug') |
|
76 | ->setParameter('slug', $slug) |
|
77 | ->build(); |
|
78 | ||
79 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
80 | } |
|
81 | ||
82 | public function add(Post $entity): void |
|
83 | { |
@@ 91-99 (lines=9) @@ | ||
88 | return $this->queryService->query($this->dqlQueryBuilder->build()); |
|
89 | } |
|
90 | ||
91 | public function findOneByUsername(string $username): User |
|
92 | { |
|
93 | $dqlQuery = $this->dqlQueryBuilder->create(User::class) |
|
94 | ->where('User.username = :username') |
|
95 | ->setParameter('username', $username) |
|
96 | ->build(); |
|
97 | ||
98 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
99 | } |
|
100 | ||
101 | public function findOneByEmail(string $email): User |
|
102 | { |
|
@@ 101-109 (lines=9) @@ | ||
98 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
99 | } |
|
100 | ||
101 | public function findOneByEmail(string $email): User |
|
102 | { |
|
103 | $dqlQuery = $this->dqlQueryBuilder->create(User::class) |
|
104 | ->where('User.email = :email') |
|
105 | ->setParameter('email', $email) |
|
106 | ->build(); |
|
107 | ||
108 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
109 | } |
|
110 | ||
111 | public function findOneById(UserId $id): User |
|
112 | { |
|
@@ 111-119 (lines=9) @@ | ||
108 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
109 | } |
|
110 | ||
111 | public function findOneById(UserId $id): User |
|
112 | { |
|
113 | $dqlQuery = $this->dqlQueryBuilder->create(User::class) |
|
114 | ->where('User.id = :id') |
|
115 | ->setParameter('id', $id) |
|
116 | ->build(); |
|
117 | ||
118 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
119 | } |
|
120 | } |
|
121 |
@@ 91-99 (lines=9) @@ | ||
88 | ?: $refreshToken->getAccessToken()->isRevoked(); |
|
89 | } |
|
90 | ||
91 | private function find(OauthRefreshTokenId $refreshTokenId): OauthRefreshToken |
|
92 | { |
|
93 | $dqlQuery = $this->dqlQueryBuilder->create(OauthRefreshToken::class) |
|
94 | ->where('OauthAccessToken.identifier = :identifier') |
|
95 | ->setParameter('identifier', $refreshTokenId) |
|
96 | ->build(); |
|
97 | ||
98 | return $this->queryService->query($dqlQuery)->getSingleResult(); |
|
99 | } |
|
100 | } |
|
101 |