Passed
Push — main ( 2bc5a4...5ffc2f )
by Vasil
16:31 queued 13:09
created

ValidatePhoneRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 26
ccs 7
cts 7
cp 1
rs 10
c 2
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getNumber() 0 3 1
A __construct() 0 4 1
A getExt() 0 3 1
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
 *
22
 * @version 1.0
23
 */
24
class ValidatePhoneRequest
25
{
26
    /**
27
     * Phone number.
28
     */
29
    private string $number;
30
31
    /**
32
     * Phone number extension.
33
     */
34
    private ?string $ext;
35
36 1
    public function __construct(string $number, string $ext = null)
37
    {
38 1
        $this->number = $number;
39 1
        $this->ext = $ext;
40
    }
41
42 1
    public function getNumber(): string
43
    {
44 1
        return $this->number;
45
    }
46
47 1
    public function getExt(): ?string
48
    {
49 1
        return $this->ext;
50
    }
51
}
52