1 | <?php |
||
16 | class ContentItem extends Document implements \JsonSerializable |
||
17 | { |
||
18 | /** |
||
19 | * The collection this Content Item belongs to. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | private $parentCollection; |
||
24 | |||
25 | /** |
||
26 | * The Page View that will be used to render this Content Item. |
||
27 | * |
||
28 | * @var PageView |
||
29 | */ |
||
30 | private $parentPageView; |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 25 | public function createJail() |
|
41 | |||
42 | 2 | public function getCollection() |
|
46 | |||
47 | 35 | public function setCollection($collection) |
|
51 | |||
52 | /** |
||
53 | * Return the body of the Content Item parsed as markdown. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | 7 | public function getContent() |
|
69 | |||
70 | /** |
||
71 | * Parse the Twig that is embedded inside a ContentItem's body. |
||
72 | */ |
||
73 | 7 | private function parseTwig() |
|
83 | |||
84 | /** |
||
85 | * Parse the ContentItem's body based on the extension of the file. |
||
86 | */ |
||
87 | 7 | private function parseEngines() |
|
108 | |||
109 | /** |
||
110 | * @return PageView |
||
111 | */ |
||
112 | public function &getPageView() |
||
116 | |||
117 | public function getJailedPageView() |
||
121 | |||
122 | /** |
||
123 | * Set the parent Page View that this Content Item will have be assigned to. |
||
124 | * |
||
125 | * @param PageView $pageView |
||
126 | */ |
||
127 | 4 | public function setPageView(&$pageView) |
|
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function jsonSerialize() |
||
143 | } |
||
144 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.