@@ -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); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $result = ''; |
| 294 | 294 | |
| 295 | 295 | if (!$this->docComment->isEmpty()) { |
| 296 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
| 296 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | //Class header |
@@ -309,27 +309,27 @@ discard block |
||
| 309 | 309 | $header .= " implements {$interfaces}"; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - $result .= $this->addIndent($header, $indentLevel) . "\n"; |
|
| 313 | - $result .= $this->addIndent("{", $indentLevel) . "\n"; |
|
| 312 | + $result .= $this->addIndent($header, $indentLevel)."\n"; |
|
| 313 | + $result .= $this->addIndent("{", $indentLevel)."\n"; |
|
| 314 | 314 | |
| 315 | 315 | //Rendering content |
| 316 | 316 | if (!empty($this->traits)) { |
| 317 | - $result .= $this->renderTraits($indentLevel + 1) . "\n\n"; |
|
| 317 | + $result .= $this->renderTraits($indentLevel + 1)."\n\n"; |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | if (!$this->constants->isEmpty()) { |
| 321 | - $result .= $this->constants->render($indentLevel + 1) . "\n\n"; |
|
| 321 | + $result .= $this->constants->render($indentLevel + 1)."\n\n"; |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | if (!$this->properties->isEmpty()) { |
| 325 | - $result .= $this->properties->render($indentLevel + 1) . "\n\n"; |
|
| 325 | + $result .= $this->properties->render($indentLevel + 1)."\n\n"; |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | if (!$this->methods->isEmpty()) { |
| 329 | - $result .= $this->methods->render($indentLevel + 1) . "\n\n"; |
|
| 329 | + $result .= $this->methods->render($indentLevel + 1)."\n\n"; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | - $result = rtrim($result, "\n") . "\n"; |
|
| 332 | + $result = rtrim($result, "\n")."\n"; |
|
| 333 | 333 | $result .= $this->addIndent("}", $indentLevel); |
| 334 | 334 | |
| 335 | 335 | return $result; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $table, |
| 29 | 29 | $columns, |
| 30 | 30 | $rowsets |
| 31 | - ) . (!empty($primaryKey) ? ' RETURNING ' . $this->quote($primaryKey) : ''); |
|
| 31 | + ).(!empty($primaryKey) ? ' RETURNING '.$this->quote($primaryKey) : ''); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -40,6 +40,6 @@ discard block |
||
| 40 | 40 | return ''; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - return 'DISTINCT' . (is_string($distinct) ? '(' . $this->quote($distinct) . ')' : ''); |
|
| 43 | + return 'DISTINCT'.(is_string($distinct) ? '('.$this->quote($distinct).')' : ''); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | //Resolve table primary key if any |
| 38 | - $primary = $driver->getPrimary($this->database->getPrefix() . $this->table); |
|
| 38 | + $primary = $driver->getPrimary($this->database->getPrefix().$this->table); |
|
| 39 | 39 | |
| 40 | 40 | if (empty($compiler)) { |
| 41 | 41 | $compiler = $this->compiler->resetQuoter(); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | protected function expression(string $identifier): string |
| 96 | 96 | { |
| 97 | - return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function ($match) { |
|
| 97 | + return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function($match) { |
|
| 98 | 98 | $identifier = $match[1]; |
| 99 | 99 | |
| 100 | 100 | //Function name |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | protected function aliasing(string $identifier, string $alias, bool $isTable): string |
| 119 | 119 | { |
| 120 | - $quoted = $this->quote($identifier, $isTable) . ' AS ' . $this->driver->identifier($alias); |
|
| 120 | + $quoted = $this->quote($identifier, $isTable).' AS '.$this->driver->identifier($alias); |
|
| 121 | 121 | |
| 122 | 122 | if ($isTable && strpos($identifier, '.') === false) { |
| 123 | 123 | //We have to apply operation post factum to prevent self aliasing (name AS name) |
@@ -154,12 +154,12 @@ discard block |
||
| 154 | 154 | protected function unpaired(string $identifier, bool $isTable): string |
| 155 | 155 | { |
| 156 | 156 | if ($isTable && !isset($this->aliases[$identifier])) { |
| 157 | - if (!isset($this->aliases[$this->prefix . $identifier])) { |
|
| 157 | + if (!isset($this->aliases[$this->prefix.$identifier])) { |
|
| 158 | 158 | //Generating our alias |
| 159 | - $this->aliases[$this->prefix . $identifier] = $identifier; |
|
| 159 | + $this->aliases[$this->prefix.$identifier] = $identifier; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - $identifier = $this->prefix . $identifier; |
|
| 162 | + $identifier = $this->prefix.$identifier; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | return $this->driver->identifier($identifier); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * |
| 83 | 83 | * @param int $expiration Current expiration time value in seconds (reference). |
| 84 | 84 | */ |
| 85 | - public function get(string $name, int &$expiration = null) |
|
| 85 | + public function get(string $name, int & $expiration = null) |
|
| 86 | 86 | { |
| 87 | 87 | if (!$this->files->exists($filename = $this->makeFilename($name))) { |
| 88 | 88 | return null; |
@@ -179,6 +179,6 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | protected function makeFilename(string $name): string |
| 181 | 181 | { |
| 182 | - return $this->directory . md5($name) . '.' . $this->extension; |
|
| 182 | + return $this->directory.md5($name).'.'.$this->extension; |
|
| 183 | 183 | } |
| 184 | 184 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | if (!$hideHeader && !empty($name)) { |
| 136 | 136 | //Showing element name (if any provided) |
| 137 | - $header = $indent . $this->style->apply($name, 'name'); |
|
| 137 | + $header = $indent.$this->style->apply($name, 'name'); |
|
| 138 | 138 | |
| 139 | 139 | //Showing equal sing |
| 140 | 140 | $header .= $this->style->apply(' = ', 'syntax', '='); |
@@ -144,24 +144,24 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | if ($level > $this->maxLevel) { |
| 146 | 146 | //Dumper is not reference based, we can't dump too deep values |
| 147 | - return $indent . $this->style->apply('-too deep-', 'maxLevel') . "\n"; |
|
| 147 | + return $indent.$this->style->apply('-too deep-', 'maxLevel')."\n"; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | $type = strtolower(gettype($value)); |
| 151 | 151 | |
| 152 | 152 | if ($type == 'array') { |
| 153 | - return $header . $this->dumpArray($value, $level, $hideHeader); |
|
| 153 | + return $header.$this->dumpArray($value, $level, $hideHeader); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | if ($type == 'object') { |
| 157 | - return $header . $this->dumpObject($value, $level, $hideHeader); |
|
| 157 | + return $header.$this->dumpObject($value, $level, $hideHeader); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | if ($type == 'resource') { |
| 161 | 161 | //No need to dump resource value |
| 162 | - $element = get_resource_type($value) . ' resource '; |
|
| 162 | + $element = get_resource_type($value).' resource '; |
|
| 163 | 163 | |
| 164 | - return $header . $this->style->apply($element, 'type', 'resource') . "\n"; |
|
| 164 | + return $header.$this->style->apply($element, 'type', 'resource')."\n"; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | //Value length |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | //Including value |
| 191 | - return $header . ' ' . $this->style->apply($element, 'value', $type) . "\n"; |
|
| 191 | + return $header.' '.$this->style->apply($element, 'value', $type)."\n"; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | $count = count($array); |
| 207 | 207 | |
| 208 | 208 | //Array size and scope |
| 209 | - $output = $this->style->apply("array({$count})", 'type', 'array') . "\n"; |
|
| 210 | - $output .= $indent . $this->style->apply('[', 'syntax', '[') . "\n"; |
|
| 209 | + $output = $this->style->apply("array({$count})", 'type', 'array')."\n"; |
|
| 210 | + $output .= $indent.$this->style->apply('[', 'syntax', '[')."\n"; |
|
| 211 | 211 | } else { |
| 212 | 212 | $output = ''; |
| 213 | 213 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | if (!$hideHeader) { |
| 228 | 228 | //Closing array scope |
| 229 | - $output .= $indent . $this->style->apply(']', 'syntax', ']') . "\n"; |
|
| 229 | + $output .= $indent.$this->style->apply(']', 'syntax', ']')."\n"; |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | return $output; |
@@ -249,10 +249,10 @@ discard block |
||
| 249 | 249 | $indent = $this->style->indent($level); |
| 250 | 250 | |
| 251 | 251 | if (!$hideHeader) { |
| 252 | - $type = ($class ?: get_class($object)) . ' object '; |
|
| 252 | + $type = ($class ?: get_class($object)).' object '; |
|
| 253 | 253 | |
| 254 | - $header = $this->style->apply($type, 'type', 'object') . "\n"; |
|
| 255 | - $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n"; |
|
| 254 | + $header = $this->style->apply($type, 'type', 'object')."\n"; |
|
| 255 | + $header .= $indent.$this->style->apply('(', 'syntax', '(')."\n"; |
|
| 256 | 256 | } else { |
| 257 | 257 | $header = ''; |
| 258 | 258 | } |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | return $header |
| 275 | 275 | . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true) |
| 276 | - . $indent . $this->style->apply(')', 'syntax', ')') . "\n"; |
|
| 276 | + . $indent.$this->style->apply(')', 'syntax', ')')."\n"; |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | if ($object instanceof \Closure) { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | //Header, content, footer |
| 292 | - return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n"; |
|
| 292 | + return $header.$output.$indent.$this->style->apply(')', 'syntax', ')')."\n"; |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | //Property name includes access level |
| 328 | - $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access); |
|
| 328 | + $name = $property->getName().$this->style->apply(':'.$access, 'access', $access); |
|
| 329 | 329 | |
| 330 | 330 | return $this->dumpValue($property->getValue($object), $name, $level + 1); |
| 331 | 331 | } |