Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class Street extends B |
||
12 | { |
||
13 | /** @var string */ |
||
14 | private $type; |
||
15 | |||
16 | /** |
||
17 | * @throws \InvalidArgumentException if supplied value is invalid. |
||
18 | */ |
||
19 | public function __construct(string $type, string $name, string $number, string $otherIdentifiers) |
||
20 | { |
||
21 | $this->setType($type); |
||
22 | |||
23 | parent::__construct($name, $number, $otherIdentifiers); |
||
24 | } |
||
25 | |||
26 | protected function setType(string $type) : void |
||
34 | } |
||
35 | |||
36 | public function getType() : string |
||
37 | { |
||
38 | return $this->type; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * e.g.: Avenida João Jorge, 112, ap. 31 |
||
43 | */ |
||
44 | public function getFormatted() : string |
||
52 | ); |
||
53 | } |
||
54 | } |
||
55 |