Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| GroupOlxListingNormalizer | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| toNormalized | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Services; |
| 6 | |
| 7 | use ImovelZapAi\Properties\Infrastructure\Persistence\Eloquent\PropertyModel; |
| 8 | use ImovelZapAi\Publishing\Application\Mappers\ListingMapper; |
| 9 | use ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Ports\GroupOlxListingNormalizerInterface; |
| 10 | use ImovelZapAi\Publishing\Domain\Canonical\NormalizedListing; |
| 11 | |
| 12 | final class GroupOlxListingNormalizer implements GroupOlxListingNormalizerInterface |
| 13 | { |
| 14 | public function __construct( |
| 15 | private readonly ListingMapper $listingMapper, |
| 16 | ) {} |
| 17 | |
| 18 | public function toNormalized(PropertyModel $property): NormalizedListing |
| 19 | { |
| 20 | return $this->listingMapper->toNormalized($property); |
| 21 | } |
| 22 | } |