Completed
Push — feature/pilot_information ( 13ff1e...cc067b )
by Laurent
01:46
created

PilotListController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace FlightLog\Http\Web\Controller;
5
6
7
use FlightLog\Application\Pilot\Command\CreateUpdatePilotInformationCommand;
8
use FlightLog\Application\Pilot\Command\CreateUpdatePilotInformationCommandHandler;
9
use FlightLog\Domain\Pilot\ValueObject\PilotId;
10
use FlightLog\Http\Web\Form\PilotForm;
11
use FlightLog\Infrastructure\Pilot\Query\Repository\PilotQueryRepository;
12
use FlightLog\Infrastructure\Pilot\Repository\PilotRepository;
13
14
final class PilotListController extends WebController
15
{
16
17
    public function index(){
18
19
        $members = $this->getPilotRepository()->query();
20
21
        return $this->render('pilot/index.phtml', [
22
            'members' => $members,
23
        ]);
24
    }
25
26
    private function getPilotRepository(): PilotQueryRepository
27
    {
28
        return new PilotQueryRepository($this->db);
29
    }
30
}