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
DefaultPartService
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
 findParts
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\Domain\Service;
4
5use App\CollectionManagement\Domain\Model\PartCollection;
6use App\Shared\Domain\Model\EntityId;
7
8readonly class DefaultPartService implements PartService
9{
10    public function __construct(
11        private LegoDataProvider $legoDataProvider
12    ) {
13    }
14
15    /**
16     * @inheritDoc
17     */
18    public function findParts(string $search, ?EntityId $userId = null): PartCollection
19    {
20        // get parts from data provider
21        return $this->legoDataProvider->findParts($search);
22    }
23}

Paths

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

DefaultPartService->__construct
10    public function __construct(
11        private LegoDataProvider $legoDataProvider
12    ) {
13    }
DefaultPartService->findParts
18    public function findParts(string $search, ?EntityId $userId = null): PartCollection
19    {
20        // get parts from data provider
21        return $this->legoDataProvider->findParts($search);
22    }
{main}
3namespace App\CollectionManagement\Domain\Service;
4
5use App\CollectionManagement\Domain\Model\PartCollection;
6use App\Shared\Domain\Model\EntityId;
7
8readonly class DefaultPartService implements PartService
9{
10    public function __construct(
11        private LegoDataProvider $legoDataProvider
12    ) {
13    }
14
15    /**
16     * @inheritDoc
17     */
18    public function findParts(string $search, ?EntityId $userId = null): PartCollection
19    {
20        // get parts from data provider
21        return $this->legoDataProvider->findParts($search);
22    }