@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | protected function indent($string, $indent = 0) |
31 | 31 | { |
32 | - return str_repeat(self::INDENT, max($indent, 0)) . $string; |
|
32 | + return str_repeat(self::INDENT, max($indent, 0)).$string; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -202,7 +202,7 @@ |
||
202 | 202 | $result = ''; |
203 | 203 | |
204 | 204 | foreach ($this->elements as $element) { |
205 | - $result .= $element->render($indentLevel) . "\n\n"; |
|
205 | + $result .= $element->render($indentLevel)."\n\n"; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | return rtrim($result, "\n"); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | $lines = $this->getLines(); |
25 | 25 | |
26 | - array_walk($lines, function (&$line) use ($search, $replace) { |
|
26 | + array_walk($lines, function(&$line) use ($search, $replace) { |
|
27 | 27 | $line = str_replace($search, $replace, $line); |
28 | 28 | }); |
29 | 29 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | public function render($indentLevel = 0) |
112 | 112 | { |
113 | 113 | $lines = $this->lines; |
114 | - array_walk($lines, function (&$line) use ($indentLevel) { |
|
114 | + array_walk($lines, function(&$line) use ($indentLevel) { |
|
115 | 115 | $line = $this->indent($line, $indentLevel); |
116 | 116 | }); |
117 | 117 |
@@ -83,22 +83,22 @@ |
||
83 | 83 | $indentShift = 0; |
84 | 84 | |
85 | 85 | if (!$this->docComment->isEmpty()) { |
86 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
86 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | if (!empty($this->getName())) { |
90 | - $result = $this->indent("namespace {$this->getName()} {", $indentLevel) . "\n"; |
|
90 | + $result = $this->indent("namespace {$this->getName()} {", $indentLevel)."\n"; |
|
91 | 91 | $indentShift = 1; |
92 | 92 | } |
93 | 93 | |
94 | 94 | if (!empty($this->uses)) { |
95 | - $result .= $this->renderUses($indentLevel + $indentShift) . "\n\n"; |
|
95 | + $result .= $this->renderUses($indentLevel + $indentShift)."\n\n"; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $result .= $this->elements->render($indentLevel + $indentShift); |
99 | 99 | |
100 | 100 | if (!empty($this->getName())) { |
101 | - $result .= "\n" . $this->indent("}", $indentLevel); |
|
101 | + $result .= "\n".$this->indent("}", $indentLevel); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | return $result; |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $result = ''; |
293 | 293 | |
294 | 294 | if (!$this->docComment->isEmpty()) { |
295 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
295 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | //Class header |
@@ -308,27 +308,27 @@ discard block |
||
308 | 308 | $header .= " implements {$interfaces}"; |
309 | 309 | } |
310 | 310 | |
311 | - $result .= $this->indent($header, $indentLevel) . "\n"; |
|
312 | - $result .= $this->indent("{", $indentLevel) . "\n"; |
|
311 | + $result .= $this->indent($header, $indentLevel)."\n"; |
|
312 | + $result .= $this->indent("{", $indentLevel)."\n"; |
|
313 | 313 | |
314 | 314 | //Rendering content |
315 | 315 | if (!empty($this->traits)) { |
316 | - $result .= $this->renderTraits($indentLevel + 1) . "\n\n"; |
|
316 | + $result .= $this->renderTraits($indentLevel + 1)."\n\n"; |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | if (!$this->constants->isEmpty()) { |
320 | - $result .= $this->constants->render($indentLevel + 1) . "\n\n"; |
|
320 | + $result .= $this->constants->render($indentLevel + 1)."\n\n"; |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | if (!$this->properties->isEmpty()) { |
324 | - $result .= $this->properties->render($indentLevel + 1) . "\n\n"; |
|
324 | + $result .= $this->properties->render($indentLevel + 1)."\n\n"; |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | if (!$this->methods->isEmpty()) { |
328 | - $result .= $this->methods->render($indentLevel + 1) . "\n\n"; |
|
328 | + $result .= $this->methods->render($indentLevel + 1)."\n\n"; |
|
329 | 329 | } |
330 | 330 | |
331 | - $result = rtrim($result, "\n") . "\n"; |
|
331 | + $result = rtrim($result, "\n")."\n"; |
|
332 | 332 | $result .= $this->indent("}", $indentLevel); |
333 | 333 | |
334 | 334 | return $result; |
@@ -143,15 +143,15 @@ |
||
143 | 143 | { |
144 | 144 | $type = ''; |
145 | 145 | if (!empty($this->type)) { |
146 | - $type = $this->type . " "; |
|
146 | + $type = $this->type." "; |
|
147 | 147 | } |
148 | 148 | |
149 | - $result = $type . ($this->pdb ? '&' : '') . "$" . $this->getName(); |
|
149 | + $result = $type.($this->pdb ? '&' : '')."$".$this->getName(); |
|
150 | 150 | |
151 | 151 | if (!$this->isOptional) { |
152 | 152 | return $result; |
153 | 153 | } |
154 | 154 | |
155 | - return $result . ' = ' . $this->serializer()->serialize($this->defaultValue); |
|
155 | + return $result.' = '.$this->serializer()->serialize($this->defaultValue); |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | \ No newline at end of file |
@@ -93,7 +93,7 @@ |
||
93 | 93 | { |
94 | 94 | $result = ''; |
95 | 95 | if (!$this->docComment->isEmpty()) { |
96 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
96 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $result .= $this->indent("{$this->access} \${$this->getName()}", $indentLevel); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | $result = ''; |
137 | 137 | if (!$this->docComment->isEmpty()) { |
138 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
138 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | $method = "{$this->getAccess()} function {$this->getName()}"; |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | $method .= "()"; |
146 | 146 | } |
147 | 147 | |
148 | - $result .= $this->indent($method, $indentLevel) . "\n"; |
|
149 | - $result .= $this->indent('{', $indentLevel) . "\n"; |
|
148 | + $result .= $this->indent($method, $indentLevel)."\n"; |
|
149 | + $result .= $this->indent('{', $indentLevel)."\n"; |
|
150 | 150 | |
151 | 151 | if (!$this->source->isEmpty()) { |
152 | - $result .= $this->source->render($indentLevel + 1) . "\n"; |
|
152 | + $result .= $this->source->render($indentLevel + 1)."\n"; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | $result .= $this->indent("}", $indentLevel); |