1 | <?php |
||
9 | abstract class ClassMethodOperationUnary extends Operation { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $context; |
||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $visibility; |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $file; |
||
22 | /** |
||
23 | * @var \PhpParser\Node\Stmt |
||
24 | */ |
||
25 | protected $contextValue; |
||
26 | /** |
||
27 | * @var \PhpParser\Node\Stmt\ClassMethod |
||
28 | */ |
||
29 | protected $classMethod; |
||
30 | |||
31 | /** |
||
32 | * @param string $context |
||
33 | * @param string $file |
||
34 | * @param \PhpParser\Node\Stmt $contextValue |
||
35 | * @param \PhpParser\Node\Stmt\ClassMethod $classMethod |
||
36 | */ |
||
37 | 56 | public function __construct($context, $file, Stmt $contextValue, ClassMethod $classMethod) |
|
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getLocation() |
||
50 | { |
||
51 | return $this->file; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | public function getLine() |
||
58 | { |
||
59 | return $this->classMethod->getLine(); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | 56 | public function getTarget() |
|
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 56 | public function getCode() |
|
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | 56 | public function getReason() |
|
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | 56 | protected function getVisibility($context) |
|
93 | } |
||
94 |