Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 71.43% |
Changes | 0 |
1 | <?php |
||
18 | trait DeprecateTrait |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $deprecationReason; |
||
24 | |||
25 | /** |
||
26 | * @param string $deprecationReason |
||
27 | * |
||
28 | * @return DeprecateInterface |
||
29 | */ |
||
30 | 33 | public function setDeprecationReason(?string $deprecationReason): DeprecateInterface |
|
31 | { |
||
32 | 33 | $this->deprecationReason = $deprecationReason; |
|
33 | |||
34 | 33 | return $this; |
|
|
|||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function isDeprecated(): bool |
||
41 | { |
||
42 | return (bool) $this->getDeprecationReason(); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | 2 | public function getDeprecationReason():?string |
|
51 | } |
||
52 | } |
||
53 |