@@ -32,7 +32,7 @@ |
||
32 | 32 | $value = ''; |
33 | 33 | } |
34 | 34 | |
35 | - $replaces[$prefix . $key . $postfix] = $value; |
|
35 | + $replaces[$prefix.$key.$postfix] = $value; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return strtr($string, $replaces); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | { |
223 | 223 | self::register(); |
224 | 224 | |
225 | - $uri = 'spiral://' . spl_object_hash($stream); |
|
225 | + $uri = 'spiral://'.spl_object_hash($stream); |
|
226 | 226 | self::$uris[$uri] = $stream; |
227 | 227 | |
228 | 228 | return $uri; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | public static function releaseUri($uri) |
274 | 274 | { |
275 | 275 | if ($uri instanceof StreamInterface) { |
276 | - $uri = 'spiral://' . spl_object_hash($uri); |
|
276 | + $uri = 'spiral://'.spl_object_hash($uri); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | unset(self::$uris[$uri]); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | |
402 | 402 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
403 | 403 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
404 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
404 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
405 | 405 | } |
406 | 406 | |
407 | 407 | $this->functions[$name] = [ |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | |
427 | 427 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
428 | 428 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
429 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
429 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | $this->declarations[token_name($tokenType)][$name] = [ |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | //Delimiters between rows and sub-arrays. |
50 | - $subIndent = "\n" . str_repeat(self::INDENT, $level + 2); |
|
51 | - $keyIndent = "\n" . str_repeat(self::INDENT, $level + 1); |
|
50 | + $subIndent = "\n".str_repeat(self::INDENT, $level + 2); |
|
51 | + $keyIndent = "\n".str_repeat(self::INDENT, $level + 1); |
|
52 | 52 | |
53 | 53 | //No keys for associated array |
54 | 54 | $associated = array_diff_key($array, array_keys(array_keys($array))); |
@@ -70,28 +70,28 @@ discard block |
||
70 | 70 | var_export($key, true), |
71 | 71 | $innerIndent, ' ', |
72 | 72 | STR_PAD_RIGHT |
73 | - ) . " => "; |
|
73 | + )." => "; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | if (!is_array($value)) { |
77 | - $result[] = $prefix . $this->packValue($value); |
|
77 | + $result[] = $prefix.$this->packValue($value); |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | |
81 | 81 | if ($value === []) { |
82 | - $result[] = $prefix . "[]"; |
|
82 | + $result[] = $prefix."[]"; |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
86 | 86 | $subArray = $this->packArray($value, $level + 1); |
87 | - $result[] = $prefix . "[{$subIndent}" . $subArray . "{$keyIndent}]"; |
|
87 | + $result[] = $prefix."[{$subIndent}".$subArray."{$keyIndent}]"; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | if ($level !== 0) { |
91 | 91 | return $result ? join(",{$keyIndent}", $result) : ""; |
92 | 92 | } |
93 | 93 | |
94 | - return "[{$keyIndent}" . join(",{$keyIndent}", $result) . "\n]"; |
|
94 | + return "[{$keyIndent}".join(",{$keyIndent}", $result)."\n]"; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (is_string($value) && class_exists($value)) { |
124 | 124 | $reflection = new \ReflectionClass($value); |
125 | 125 | |
126 | - return '\\' . $reflection->getName() . '::class'; |
|
126 | + return '\\'.$reflection->getName().'::class'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | return var_export($value, true); |
@@ -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); |
@@ -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 |