Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
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
GroupOlxListingNormalizer
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
1
 toNormalized
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Services;
6
7use ImovelZapAi\Properties\Infrastructure\Persistence\Eloquent\PropertyModel;
8use ImovelZapAi\Publishing\Application\Mappers\ListingMapper;
9use ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Ports\GroupOlxListingNormalizerInterface;
10use ImovelZapAi\Publishing\Domain\Canonical\NormalizedListing;
11
12final 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}