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

GetFollowersOfPage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A execute() 0 14 1
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