Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| SearchPartHandler | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\CollectionManagement\Application\Handler; |
| 4 | |
| 5 | use App\CollectionManagement\Application\Command\SearchPartQuery; |
| 6 | use App\CollectionManagement\Domain\Model\PartCollection; |
| 7 | use App\CollectionManagement\Domain\Service\PartService; |
| 8 | |
| 9 | final readonly class SearchPartHandler |
| 10 | { |
| 11 | public function __construct( |
| 12 | private PartService $partService |
| 13 | ) { |
| 14 | } |
| 15 | |
| 16 | public function __invoke(SearchPartQuery $query): PartCollection |
| 17 | { |
| 18 | return $this->partService->findParts($query->getSearch(), $query->getUserId()); |
| 19 | } |
| 20 | } |