Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
88.89% covered (warning)
88.89%
8 / 9
83.33% covered (warning)
83.33%
5 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
AddressWithZipcodeCheck
88.89% covered (warning)
88.89%
8 / 9
83.33% covered (warning)
83.33%
5 / 6
6.05
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 getStreet
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getStreetNumber
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getZipcode
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getCity
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isManualAddress
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\Fixtures\ValueObjects;
3
4use Apie\Core\Attributes\Internal;
5use Apie\Core\ValueObjects\CompositeValueObject;
6use Apie\Core\ValueObjects\DatabaseText;
7use Apie\Core\ValueObjects\Interfaces\ValueObjectInterface;
8
9class AddressWithZipcodeCheck implements ValueObjectInterface
10{
11    use CompositeValueObject;
12
13    private DatabaseText $street;
14
15    private DatabaseText $streetNumber;
16
17    private DatabaseText $zipcode;
18
19    private DatabaseText $city;
20
21    #[Internal]
22    private bool $manual = true;
23
24    public function __construct(
25        DatabaseText $street,
26        DatabaseText $streetNumber,
27        DatabaseText $zipcode,
28        DatabaseText $city
29    ) {
30        $this->street = $street;
31        $this->streetNumber = $streetNumber;
32        $this->zipcode = $zipcode;
33        $this->city = $city;
34    }
35
36    public function getStreet(): DatabaseText
37    {
38        return $this->street;
39    }
40
41    public function getStreetNumber(): DatabaseText
42    {
43        return $this->streetNumber;
44    }
45
46    public function getZipcode(): DatabaseText
47    {
48        return $this->zipcode;
49    }
50
51    public function getCity(): DatabaseText
52    {
53        return $this->city;
54    }
55
56    public function isManualAddress(): bool
57    {
58        return $this->manual;
59    }
60}