ListOrganizations   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A list() 0 3 1
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Organizations;
5
6
7
use App\Src\UseCases\Domain\Ports\OrganizationRepository;
8
9
class ListOrganizations
10
{
11
    private $organizationRepository;
12
13
    public function __construct(OrganizationRepository $organizationRepository)
14
    {
15
        $this->organizationRepository = $organizationRepository;
16
    }
17
18
    public function list(int $page, int $perPage = 10)
19
    {
20
        return $this->organizationRepository->search($page, $perPage);
21
    }
22
}
23