Completed
Push — phonenumber ( a83019...70d761 )
by Sullivan
02:26
created

PhoneNumber::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace SLLH\IsoCodesValidator\Constraints;
4
5
use SLLH\IsoCodesValidator\AbstractConstraint;
6
7
/**
8
 * @Annotation
9
 * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
10
 *
11
 * @author Sullivan Senechal <[email protected]>
12
 */
13
final class PhoneNumber extends AbstractConstraint
14
{
15
    const ALL = 'all';
16
17
    public $country = self::ALL;
18
19
    public $message = 'This value is not a valid phone number.';
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function __construct($options = null)
25
    {
26
        parent::__construct($options);
27
28
        // TODO: Check if country is available as for ZipCode.
0 ignored issues
show
Coding Style Best Practice introduced by
Comments for TODO tasks are often forgotten in the code; it might be better to use a dedicated issue tracker.
Loading history...
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getIsoCodesVersion()
35
    {
36
        return '2.1.0';
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getIsoCodesClass()
43
    {
44
        return \IsoCodes\PhoneNumber::class;
45
    }
46
}
47