Completed
Push — master ( 59746f...828139 )
by Rafael
04:54
created

DeprecationWarning::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Behat\Deprecation;
12
13
/**
14
 * Storage a deprecation message with details
15
 */
16
class DeprecationWarning
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $message;
22
23
    /**
24
     * @var string|null
25
     */
26
    protected $file;
27
28
    /**
29
     * @var int|null
30
     */
31
    protected $line;
32
33
    /**
34
     * DeprecationWarning constructor.
35
     *
36
     * @param string      $message
37
     * @param null|string $file
38
     * @param int|null    $line
39
     */
40
    public function __construct(string $message, ?string $file = null, ?int $line = null)
41
    {
42
        $this->message = $message;
43
        $this->file = $file;
44
        $this->line = $line;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getMessage(): string
51
    {
52
        return $this->message;
53
    }
54
55
    /**
56
     * @return null|string
57
     */
58
    public function getFile(): ?string
59
    {
60
        return $this->file;
61
    }
62
63
    /**
64
     * @return int|null
65
     */
66
    public function getLine(): ?int
67
    {
68
        return $this->line;
69
    }
70
}
71