1 | <?php |
||
14 | abstract class AEmbedment |
||
15 | { |
||
16 | use TGetter; |
||
17 | |||
18 | /** |
||
19 | * Embed content |
||
20 | * |
||
21 | * @var string |
||
22 | * |
||
23 | * @access protected |
||
24 | */ |
||
25 | protected $content=''; |
||
|
|||
26 | |||
27 | /** |
||
28 | * The main document which this embedment embedding into. |
||
29 | * |
||
30 | * @var \Htsl\Parser\Document |
||
31 | * |
||
32 | * @access protected |
||
33 | */ |
||
34 | protected $document; |
||
35 | |||
36 | /** |
||
37 | * Constructor. |
||
38 | * |
||
39 | * @access public |
||
40 | * |
||
41 | * @param \Htsl\Parser\Document $document |
||
42 | */ |
||
43 | final public function __construct( Document$document ) |
||
49 | |||
50 | /** |
||
51 | * Getting content. |
||
52 | * |
||
53 | * @access public |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | final public function getContent():string |
||
61 | |||
62 | /** |
||
63 | * Real constructor to be rewrite. |
||
64 | */ |
||
65 | protected function construct(){} |
||
66 | |||
67 | /** |
||
68 | * Parsing line. |
||
69 | * |
||
70 | * @access public |
||
71 | * |
||
72 | * @param \Htsl\ReadingBuffer\Line $line |
||
73 | * |
||
74 | * @return \Htsl\Embedment\Contracts |
||
75 | */ |
||
76 | abstract public function parseLine( Line$line ):self; |
||
77 | } |
||
78 |
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.