@@ -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 | |
@@ -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); |
@@ -120,16 +120,16 @@ |
||
| 120 | 120 | return sprintf('%F', $parameter); |
| 121 | 121 | |
| 122 | 122 | case 'string': |
| 123 | - return "'" . addcslashes($parameter, "'") . "'"; |
|
| 123 | + return "'".addcslashes($parameter, "'")."'"; |
|
| 124 | 124 | |
| 125 | 125 | case 'object': |
| 126 | 126 | if (method_exists($parameter, '__toString')) { |
| 127 | - return "'" . addcslashes((string)$parameter, "'") . "'"; |
|
| 127 | + return "'".addcslashes((string)$parameter, "'")."'"; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | if ($parameter instanceof \DateTime) { |
| 131 | 131 | //Let's process dates different way |
| 132 | - return "'" . $parameter->format(\DateTime::ISO8601) . "'"; |
|
| 132 | + return "'".$parameter->format(\DateTime::ISO8601)."'"; |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | continue; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - $pattern = '/^' . str_replace('*', '.+', $pattern) . '/i'; |
|
| 83 | + $pattern = '/^'.str_replace('*', '.+', $pattern).'/i'; |
|
| 84 | 84 | |
| 85 | 85 | if (preg_match($pattern, $name)) { |
| 86 | 86 | unset($result[$name]); |
@@ -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->addIndent("namespace {$this->getName()} {", $indentLevel) . "\n"; |
|
| 90 | + $result = $this->addIndent("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->addIndent("}", $indentLevel); |
|
| 101 | + $result .= "\n".$this->addIndent("}", $indentLevel); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | 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->getSerializer()->serialize($this->defaultValue); |
|
| 155 | + return $result.' = '.$this->getSerializer()->serialize($this->defaultValue); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | \ No newline at end of file |
@@ -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->addIndent("const {$this->getName()} = ", $indentLevel); |
| 82 | 82 | |
| 83 | 83 | //todo: make indent level work |
| 84 | - return $result . $this->getSerializer()->serialize($this->value); |
|
| 84 | + return $result.$this->getSerializer()->serialize($this->value); |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | \ No newline at end of file |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $result = ''; |
| 136 | 136 | if (!$this->docComment->isEmpty()) { |
| 137 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
| 137 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | $method = "{$this->getAccess()} function {$this->getName()}"; |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | $method .= "()"; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $result .= $this->addIndent($method, $indentLevel) . "\n"; |
|
| 148 | - $result .= $this->addIndent('{', $indentLevel) . "\n"; |
|
| 147 | + $result .= $this->addIndent($method, $indentLevel)."\n"; |
|
| 148 | + $result .= $this->addIndent('{', $indentLevel)."\n"; |
|
| 149 | 149 | |
| 150 | 150 | if (!$this->source->isEmpty()) { |
| 151 | - $result .= $this->source->render($indentLevel + 1) . "\n"; |
|
| 151 | + $result .= $this->source->render($indentLevel + 1)."\n"; |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $result .= $this->addIndent("}", $indentLevel); |