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

Warning::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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