Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
SearchPartHandler
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 __invoke
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\CollectionManagement\Application\Handler;
4
5use App\CollectionManagement\Application\Command\SearchPartQuery;
6use App\CollectionManagement\Domain\Model\PartCollection;
7use App\CollectionManagement\Domain\Service\PartService;
8
9final 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}

Branches

Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once. Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.

SearchPartHandler->__construct
11    public function __construct(
12        private PartService $partService
13    ) {
14    }
SearchPartHandler->__invoke
16    public function __invoke(SearchPartQuery $query): PartCollection
17    {
18        return $this->partService->findParts($query->getSearch(), $query->getUserId());
19    }
{main}
3namespace App\CollectionManagement\Application\Handler;
4
5use App\CollectionManagement\Application\Command\SearchPartQuery;
6use App\CollectionManagement\Domain\Model\PartCollection;
7use App\CollectionManagement\Domain\Service\PartService;
8
9final 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    }