Test Failed
Push — main ( d030ca...7189b9 )
by Vasil
05:52
created

ValidatePhoneRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
/*
4
 * This file is part of the Neutrino package.
5
 *
6
 * (c) Vasil Dakov <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace VasilDakov\Speedy\Service\Validation;
15
16
/**
17
 * Class ValidatePhoneRequest
18
 *
19
 * @author Vasil Dakov <[email protected]>
20
 * @copyright 2009-2023 Neutrino.bg
21
 * @version 1.0
22
 */
23
class ValidatePhoneRequest
24
{
25
    /**
26
     * Phone number
27
     * @var string
28
     */
29
    private string $number;
30
31
    /**
32
     * Phone number extension
33
     * @var string|null
34
     */
35
    private ?string $ext;
36
37
    /**
38
     * @param string $number
39
     * @param string|null $ext
40
     */
41
    public function __construct(string $number, string $ext = null)
42
    {
43
        $this->number = $number;
44
        $this->ext = $ext;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getNumber(): string
51
    {
52
        return $this->number;
53
    }
54
55
    /**
56
     * @return string|null
57
     */
58
    public function getExt(): ?string
59
    {
60
        return $this->ext;
61
    }
62
}