1 | <?php |
||
15 | class DocHelper |
||
16 | { |
||
17 | /** |
||
18 | * The php cs file. |
||
19 | * |
||
20 | * @var File |
||
21 | */ |
||
22 | private $file; |
||
23 | |||
24 | /** |
||
25 | * Pointer to the token which is to be listened. |
||
26 | * |
||
27 | * @var int |
||
28 | */ |
||
29 | private $stackPtr; |
||
30 | |||
31 | /** |
||
32 | * Token stack of the current file. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | private $tokens; |
||
37 | |||
38 | /** |
||
39 | * DocHelper constructor. |
||
40 | * |
||
41 | * @param File $file File object of file which is processed. |
||
42 | * @param int $stackPtr Pointer to the token which is processed. |
||
43 | */ |
||
44 | 109 | public function __construct(File $file, $stackPtr) |
|
50 | |||
51 | /** |
||
52 | * Checks if a comment for the class exists. |
||
53 | * |
||
54 | * @param int $listenerPtr Pointer of the listener token |
||
55 | * |
||
56 | * @return bool Indicator if the comment exists or not |
||
57 | */ |
||
58 | 109 | public function checkCommentExists($listenerPtr) |
|
77 | |||
78 | /** |
||
79 | * Checks if the comment is multi line. |
||
80 | * |
||
81 | * @return bool Indicator if the comment is multiline |
||
82 | */ |
||
83 | 105 | public function checkCommentMultiLine() |
|
100 | |||
101 | /** |
||
102 | * Returns pointer to the class comment start. |
||
103 | * |
||
104 | * @return int Pointer to the class comment start. |
||
105 | */ |
||
106 | 105 | public function getCommentStartPointer() |
|
112 | |||
113 | /** |
||
114 | * Returns token data of the evaluated class comment start. |
||
115 | * |
||
116 | * @return array Token data of the comment start. |
||
117 | */ |
||
118 | 105 | public function getCommentStartToken() |
|
124 | |||
125 | /** |
||
126 | * Returns pointer to the class comment end. |
||
127 | * |
||
128 | * @return int Pointer to the class comment end. |
||
129 | */ |
||
130 | 109 | public function getCommentEndPointer() |
|
144 | |||
145 | /** |
||
146 | * Returns token data of the evaluated class comment end. |
||
147 | * |
||
148 | * @return array Token data of the comment end. |
||
149 | */ |
||
150 | 109 | public function getCommentEndToken() |
|
154 | } |
||
155 |