Issues (54)

src/Service/Shipment/ShipmentPhoneNumber.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Shipment;
6
7
use VasilDakov\Speedy\Speedy;
8
use VasilDakov\Speedy\Traits\ToArray;
9
10
/**
11
 * Class ShipmentPhoneNumber.
12
 *
13
 * @author Vasil Dakov <[email protected]>
14
 * @author Valentin Valkanov <[email protected]>
15
 * @copyright 2009-2022 Neutrino.bg
16
 *
17
 * @version 1.0
18
 *
19
 * @todo https://api.speedy.bg/web-api.html?fbclid=IwAR1pcF0uXsAZheAKesQcArBJ7QenkDVyEz36aXwfRGCQZvcInjIYMuE82E4#href-ds-shipment-phone-number
20
 */
21
class ShipmentPhoneNumber
22
{
23
    use ToArray;
0 ignored issues
show
The trait VasilDakov\Speedy\Traits\ToArray requires the property $value which is not provided by VasilDakov\Speedy\Servic...ent\ShipmentPhoneNumber.
Loading history...
24
25
    private string $number;
26
27
    private ?string $extension = null;
28
29 5
    public function __construct(string $number)
30
    {
31 5
        $this->setNumber($number);
32
    }
33
34 5
    private function setNumber(string $number): void
35
    {
36 5
        $this->number = $number;
37
    }
38
39
    /**
40
     * @return string number
41
     */
42 1
    public function getNumber(): string
43
    {
44 1
        return $this->number;
45
    }
46
47 1
    public function setExtension(string $extension): self
48
    {
49 1
        $this->extension = $extension;
50
51 1
        return $this;
52
    }
53
54 1
    public function getExtension(): ?string
55
    {
56 1
        return $this->extension;
57
    }
58
}
59