Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class PortfolioAttachmentRepository extends ServiceEntityRepository |
||
16 | { |
||
17 | public function __construct(ManagerRegistry $registry) |
||
18 | { |
||
19 | parent::__construct($registry, PortfolioAttachment::class); |
||
20 | } |
||
21 | |||
22 | public function findFromItem(Portfolio $item): array |
||
28 | ] |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return array<int, PortfolioComment> |
||
34 | */ |
||
35 | public function findFromComment(PortfolioComment $comment): array |
||
36 | { |
||
37 | return $this->findBy( |
||
38 | [ |
||
39 | 'origin' => $comment->getId(), |
||
40 | 'originType' => PortfolioAttachment::TYPE_COMMENT, |
||
41 | ] |
||
42 | ); |
||
43 | } |
||
44 | |||
45 | public function removeFromComment(PortfolioComment $comment): void |
||
51 | } |
||
52 | } |
||
53 | } |
||
54 |