Passed
Push — 3.x ( 4cccb8...037594 )
by Eduardo Gulias
02:37
created

Warning   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 41
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A message() 0 3 1
A code() 0 3 1
A RFCNumber() 0 3 1
1
<?php
2
3
namespace Egulias\EmailValidator\Warning;
4
5
abstract class Warning
6
{
7
    const CODE = 0;
8
9
    /**
10
     * @var string
11
     */
12
    protected $message = '';
13
14
    /**
15
     * @var int
16
     */
17
    protected $rfcNumber = 0;
18
19
    /**
20
     * @return string
21
     */
22 12
    public function message()
23
    {
24 12
        return $this->message;
25
    }
26
27
    /**
28
     * @return int
29
     */
30 12
    public function code()
31
    {
32 12
        return self::CODE;
33
    }
34
35
    /**
36
     * @return int
37
     */
38
    public function RFCNumber()
39
    {
40
        return $this->rfcNumber;
41
    }
42
43 12
    public function __toString()
44
    {
45 12
        return $this->message() . " rfc: " .  $this->rfcNumber . "interal code: " . static::CODE;
46
    }
47
}
48