1 | <?php |
||
9 | class PropertyAdded extends PropertyOperation { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | protected $code = [ |
||
14 | 'class' => ['V019', 'V020', 'V026'], |
||
15 | 'trait' => ['V049', 'V050', 'V055'], |
||
16 | ]; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $reason = 'Property has been added.'; |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $fileAfter; |
||
25 | /** |
||
26 | * @var \PhpParser\Node\Stmt |
||
27 | */ |
||
28 | protected $contextAfter; |
||
29 | /** |
||
30 | * @var \PhpParser\Node\Stmt\Property |
||
31 | */ |
||
32 | protected $propertyAfter; |
||
33 | |||
34 | /** |
||
35 | * @param string $context |
||
36 | * @param string $fileAfter |
||
37 | * @param \PhpParser\Node\Stmt $contextAfter |
||
38 | * @param \PhpParser\Node\Stmt\Property $propertyAfter |
||
39 | */ |
||
40 | 2 | public function __construct($context, $fileAfter, Stmt $contextAfter, Property $propertyAfter) |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getLocation() |
||
53 | { |
||
54 | return $this->fileAfter; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return int |
||
59 | */ |
||
60 | public function getLine() |
||
61 | { |
||
62 | return $this->propertyAfter->getLine(); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 2 | public function getTarget() |
|
72 | } |
||
73 |