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 |
| DefaultPartService | |
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 | |||
| findParts | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\CollectionManagement\Domain\Service; |
| 4 | |
| 5 | use App\CollectionManagement\Domain\Model\PartCollection; |
| 6 | use App\Shared\Domain\Model\EntityId; |
| 7 | |
| 8 | readonly 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 | } |