Completed
Push — master ( 33476c...427ebd )
by Bertrand
09:14
created

CountInteractionsOnPageQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A execute() 0 3 1
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Agricultural\Queries;
5
6
7
use App\Src\UseCases\Domain\Ports\InteractionRepository;
8
9
class CountInteractionsOnPageQuery
10
{
11
    private $interactionRepository;
12
13
    public function __construct(InteractionRepository $interactionRepository)
14
    {
15
        $this->interactionRepository = $interactionRepository;
16
    }
17
18
    public function execute(int $pageId):array
19
    {
20
        return $this->interactionRepository->getCountInteractionsOnPage($pageId);
21
    }
22
}
23