| 1 | <?php |
||
| 5 | abstract class AbstractSectionParser implements SectionParser |
||
| 6 | { |
||
| 7 | const |
||
| 8 | COMMENT_CHARACTER = '#'; |
||
| 9 | |||
| 10 | protected |
||
| 11 | $currentFilePath, |
||
|
|
|||
| 12 | $currentLineNumber; |
||
| 13 | |||
| 14 | public function __construct() |
||
| 19 | |||
| 20 | public function setCurrentFile($filePath) |
||
| 24 | |||
| 25 | protected function isACommentLine($line) |
||
| 29 | |||
| 30 | final public function parse($line, $lineNumber) |
||
| 36 | |||
| 37 | abstract protected function parseLine($line); |
||
| 38 | |||
| 39 | protected function triggerError($message, $title = 'Syntax error') |
||
| 49 | |||
| 50 | public function postParse() |
||
| 53 | } |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.