@@ -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); |
@@ -75,12 +75,12 @@ |
||
| 75 | 75 | { |
| 76 | 76 | $result = ''; |
| 77 | 77 | if (!$this->docComment->isEmpty()) { |
| 78 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
| 78 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $result .= $this->indent("const {$this->getName()} = ", $indentLevel); |
| 82 | 82 | |
| 83 | 83 | //todo: make indent level work |
| 84 | - return $result . $this->serializer()->serialize($this->value); |
|
| 84 | + return $result.$this->serializer()->serialize($this->value); |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | \ No newline at end of file |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $result = "<?php\n"; |
| 109 | 109 | |
| 110 | 110 | if (!$this->docComment->isEmpty()) { |
| 111 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
| 111 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | if (!empty($this->namespace)) { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if (!empty($this->uses)) { |
| 119 | - $result .= $this->renderUses($indentLevel) . "\n\n"; |
|
| 119 | + $result .= $this->renderUses($indentLevel)."\n\n"; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $result .= $this->elements->render($indentLevel); |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | public function __debugInfo() |
| 329 | 329 | { |
| 330 | 330 | return [ |
| 331 | - 'collection' => $this->getDatabase() . '/' . $this->getCollection(), |
|
| 331 | + 'collection' => $this->getDatabase().'/'.$this->getCollection(), |
|
| 332 | 332 | 'query' => $this->query, |
| 333 | 333 | 'limit' => $this->getLimit(), |
| 334 | 334 | 'offset' => $this->getOffset(), |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | */ |
| 423 | 423 | private function normalizeDates(array $query) |
| 424 | 424 | { |
| 425 | - array_walk_recursive($query, function (&$value) { |
|
| 425 | + array_walk_recursive($query, function(&$value) { |
|
| 426 | 426 | if ($value instanceof \DateTime) { |
| 427 | 427 | //MongoDate is always UTC, which is good :) |
| 428 | 428 | $value = new \MongoDate($value->getTimestamp()); |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $debug['explained'] = $cursor->explain(); |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - $this->logger()->debug('{db}/{collection}: ' . json_encode($debug, JSON_PRETTY_PRINT), [ |
|
| 474 | + $this->logger()->debug('{db}/{collection}: '.json_encode($debug, JSON_PRETTY_PRINT), [ |
|
| 475 | 475 | 'db' => $this->getDatabase(), |
| 476 | 476 | 'collection' => $this->getCollection(), |
| 477 | 477 | 'queryInfo' => $debug, |