1 | <?php |
||
18 | class Indent |
||
19 | { |
||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $inlineIndented = false; |
||
24 | |||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $increaseSpecialIndent = false; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $indentLvl = 0; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | protected $increaseBlockIndent = false; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $indentTypes = []; |
||
44 | |||
45 | /** |
||
46 | * Increase the Special Indent if increaseSpecialIndent is true after the current iteration. |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function increaseSpecialIndent() |
||
60 | |||
61 | /** |
||
62 | * Increase the Block Indent if increaseBlockIndent is true after the current iteration. |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function increaseBlockIndent() |
||
76 | |||
77 | /** |
||
78 | * Closing parentheses decrease the block indent level. |
||
79 | * |
||
80 | * @param Formatter $formatter |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function decreaseIndentLevelUntilIndentTypeIsSpecial(Formatter $formatter) |
||
98 | |||
99 | /** |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function decreaseSpecialIndentIfCurrentIndentTypeIsSpecial() |
||
113 | |||
114 | /** |
||
115 | * @return bool |
||
116 | */ |
||
117 | public function getIncreaseBlockIndent() |
||
121 | |||
122 | /** |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function getIncreaseSpecialIndent() |
||
129 | |||
130 | /** |
||
131 | * @return int |
||
132 | */ |
||
133 | public function getIndentLvl() |
||
137 | |||
138 | /** |
||
139 | * @return mixed |
||
140 | */ |
||
141 | public function getIndentTypes() |
||
145 | |||
146 | /** |
||
147 | * @param bool $increaseBlockIndent |
||
148 | * |
||
149 | * @return $this |
||
150 | */ |
||
151 | public function setIncreaseBlockIndent($increaseBlockIndent) |
||
157 | |||
158 | /** |
||
159 | * @param bool $increaseSpecialIndent |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function setIncreaseSpecialIndent($increaseSpecialIndent) |
||
169 | |||
170 | /** |
||
171 | * @param int $indentLvl |
||
172 | * |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function setIndentLvl($indentLvl) |
||
181 | |||
182 | /** |
||
183 | * @param array $indentTypes |
||
184 | * |
||
185 | * @return $this |
||
186 | */ |
||
187 | public function setIndentTypes($indentTypes) |
||
193 | |||
194 | /** |
||
195 | * @param bool $inlineIndented |
||
196 | * |
||
197 | * @return $this |
||
198 | */ |
||
199 | public function setInlineIndented($inlineIndented) |
||
205 | |||
206 | /** |
||
207 | * @return bool |
||
208 | */ |
||
209 | public function getInlineIndented() |
||
213 | } |
||
214 |