| 1 | <?php |
||
| 14 | abstract class ABuffer |
||
| 15 | { |
||
| 16 | use TGetter; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The htsl server. |
||
| 20 | * |
||
| 21 | * @access protected |
||
| 22 | * |
||
| 23 | * @var \Htsl\Htsl |
||
| 24 | */ |
||
| 25 | protected $htsl; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The file name. |
||
| 29 | * |
||
| 30 | * @access protected |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $filePath= ''; |
||
|
|
|||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructing a buffer reading HTSL content from somewhere. |
||
| 38 | * |
||
| 39 | * @access public |
||
| 40 | * |
||
| 41 | * @param Htsl $htsl [description] |
||
| 42 | */ |
||
| 43 | public function __construct( Htsl$htsl ) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Getting a line of the document. |
||
| 50 | * |
||
| 51 | * @access public |
||
| 52 | * |
||
| 53 | * @return \Htsl\ReadingBuffer\Line |
||
| 54 | */ |
||
| 55 | abstract public function getLine(); |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Getting physical or fake path of file within this buffer. |
||
| 59 | * |
||
| 60 | * @access public |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getFilePath():string |
||
| 65 | { |
||
| 66 | return $this->filePath; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Getting another file reference file of this buffer. |
||
| 71 | * |
||
| 72 | * @access public |
||
| 73 | * |
||
| 74 | * @param string $fileName |
||
| 75 | * |
||
| 76 | * @return \Htsl\ReadingBuffer\Contracts\ABuffer |
||
| 77 | */ |
||
| 78 | abstract public function goSide( $fileName ):self; |
||
| 79 | } |
||
| 80 |
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
will have no issues, while
will report issues in lines 1 and 2.