Completed
Push — not-exists ( 0b7a0f )
by Sullivan
05:13 queued 02:01
created

Ip   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIsoCodesVersion() 0 4 1
A getIsoCodesClass() 0 4 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 Ip extends AbstractConstraint
14
{
15
    public $message = 'This value is not a valid IP address.';
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getIsoCodesVersion()
21
    {
22
        return '1.0.0';
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getIsoCodesClass()
29
    {
30
        return \IsoCodes\IP::class;
31
    }
32
}
33