1 | <?php |
||
17 | class DocHelper |
||
18 | { |
||
19 | /** |
||
20 | * The php cs file. |
||
21 | * |
||
22 | * @var File |
||
23 | */ |
||
24 | private $file; |
||
25 | |||
26 | /** |
||
27 | * Pointer to the token which is to be listened. |
||
28 | * |
||
29 | * @var int |
||
30 | */ |
||
31 | private $stackPtr; |
||
32 | |||
33 | /** |
||
34 | * Token stack of the current file. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | private $tokens; |
||
39 | |||
40 | /** |
||
41 | * DocHelper constructor. |
||
42 | * |
||
43 | * @param File $file File object of file which is processed. |
||
44 | * @param int $stackPtr Pointer to the token which is processed. |
||
45 | */ |
||
46 | 121 | public function __construct(File $file, $stackPtr) |
|
52 | |||
53 | /** |
||
54 | * Checks if a comment for the class exists. |
||
55 | * |
||
56 | * @param int $listenerPtr Pointer of the listener token |
||
57 | * |
||
58 | * @return bool Indicator if the comment exists or not |
||
59 | */ |
||
60 | 121 | public function checkCommentExists(int $listenerPtr): bool |
|
79 | |||
80 | /** |
||
81 | * Checks if the comment is multi line. |
||
82 | * |
||
83 | * @return bool Indicator if the comment is multiline |
||
84 | */ |
||
85 | 117 | public function checkCommentMultiLine(): bool |
|
102 | |||
103 | /** |
||
104 | * Returns pointer to the class comment start. |
||
105 | * |
||
106 | * @return int Pointer to the class comment start. |
||
107 | */ |
||
108 | 117 | public function getCommentStartPointer(): int |
|
114 | |||
115 | /** |
||
116 | * Returns token data of the evaluated class comment start. |
||
117 | * |
||
118 | * @return array Token data of the comment start. |
||
119 | */ |
||
120 | 117 | public function getCommentStartToken(): array |
|
126 | |||
127 | /** |
||
128 | * Returns pointer to the class comment end. |
||
129 | * |
||
130 | * @return int Pointer to the class comment end. |
||
131 | */ |
||
132 | 121 | public function getCommentEndPointer(): int |
|
146 | |||
147 | /** |
||
148 | * Returns token data of the evaluated class comment end. |
||
149 | * |
||
150 | * @return array Token data of the comment end. |
||
151 | */ |
||
152 | 121 | public function getCommentEndToken(): array |
|
156 | } |
||
157 |