Passed
Push — master ( 956624...05ed8c )
by Bertrand
08:49
created

GetFollowersOfPage::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 5
dl 0
loc 14
rs 10
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Context\Queries;
5
6
7
use App\Src\UseCases\Domain\Ports\InteractionRepository;
8
use Illuminate\Contracts\Pagination\Paginator;
9
10
class GetFollowersOfPage
11
{
12
    private $interactionRepository;
13
14
    public function __construct(InteractionRepository $interactionRepository)
15
    {
16
        $this->interactionRepository = $interactionRepository;
17
    }
18
19
    public function execute(
20
        int $pageId,
21
        string $type = 'follow',
22
        ?string $dept = null,
23
        string $characteristicIdFarmingType = null,
24
        string $characteristicIdCroppingSystem = null
25
    ):Paginator
26
    {
27
        return $this->interactionRepository->getFollowersPage(
28
            $pageId,
29
            $type,
30
            $dept,
31
            $characteristicIdFarmingType,
32
            $characteristicIdCroppingSystem
33
        );
34
    }
35
}
36