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