1 | <?php |
||
20 | class DocBlock |
||
21 | { |
||
22 | const LINE_ENDINGS = ["\r\n","\n\r","\r"]; |
||
23 | |||
24 | private $docBlockString; |
||
25 | |||
26 | /** |
||
27 | * @param string $docBlockString |
||
28 | */ |
||
29 | public function __construct(string $docBlockString) |
||
33 | |||
34 | /** |
||
35 | * @param $annotationName |
||
36 | * @return array|null |
||
37 | */ |
||
38 | public function parseAnnotation($annotationName): ?array |
||
59 | |||
60 | /** |
||
61 | * @param string $str |
||
62 | * @return array |
||
63 | */ |
||
64 | private function splitLines(string $str): array |
||
68 | |||
69 | /** |
||
70 | * @param string $str |
||
71 | * @return array |
||
72 | */ |
||
73 | private function tokenizeLine(string $str): array |
||
79 | |||
80 | /** |
||
81 | * @param string $str |
||
82 | * @param string $endsWith (last character) |
||
83 | * @return bool |
||
84 | */ |
||
85 | private function endsWith(string $str, string $endsWith): bool |
||
90 | } |