@@ -177,7 +177,7 @@ |
||
| 177 | 177 | /** |
| 178 | 178 | * {@inheritdoc} |
| 179 | 179 | */ |
| 180 | - public function locateBucket(string $address, string &$name = null): BucketInterface |
|
| 180 | + public function locateBucket(string $address, string & $name = null): BucketInterface |
|
| 181 | 181 | { |
| 182 | 182 | /** |
| 183 | 183 | * @var BucketInterface $bestBucket |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | public function exists( |
| 75 | 75 | BucketInterface $bucket, |
| 76 | 76 | string $name, |
| 77 | - ResponseInterface &$response = null |
|
| 77 | + ResponseInterface & $response = null |
|
| 78 | 78 | ): bool { |
| 79 | 79 | try { |
| 80 | 80 | $response = $this->client->send($this->buildRequest('HEAD', $bucket, $name)); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | protected function buildUri(BucketInterface $bucket, string $name): UriInterface |
| 225 | 225 | { |
| 226 | 226 | return new Uri( |
| 227 | - $this->options['server'] . '/' . $bucket->getOption('bucket') . '/' . rawurlencode($name) |
|
| 227 | + $this->options['server'].'/'.$bucket->getOption('bucket').'/'.rawurlencode($name) |
|
| 228 | 228 | ); |
| 229 | 229 | } |
| 230 | 230 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | { |
| 270 | 270 | $headers = []; |
| 271 | 271 | foreach ($commands as $command => $value) { |
| 272 | - $headers['X-Amz-' . $command] = $value; |
|
| 272 | + $headers['X-Amz-'.$command] = $value; |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | return $headers; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $normalizedCommands = []; |
| 298 | 298 | foreach ($packedCommands as $command => $value) { |
| 299 | 299 | if (!empty($value)) { |
| 300 | - $normalizedCommands[] = strtolower($command) . ':' . $value; |
|
| 300 | + $normalizedCommands[] = strtolower($command).':'.$value; |
|
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | return $request->withAddedHeader( |
| 312 | 312 | 'Authorization', |
| 313 | - 'AWS ' . $this->options['accessKey'] . ':' . base64_encode( |
|
| 313 | + 'AWS '.$this->options['accessKey'].':'.base64_encode( |
|
| 314 | 314 | hash_hmac('sha1', join("\n", $signature), $this->options['secretKey'], true) |
| 315 | 315 | ) |
| 316 | 316 | ); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | if (!empty($maxAge = $bucket->getOption('maxAge', 0))) { |
| 336 | 336 | //Shortcut |
| 337 | - $headers['Cache-control'] = 'max-age=' . $bucket->getOption('maxAge', 0) . ', public'; |
|
| 337 | + $headers['Cache-control'] = 'max-age='.$bucket->getOption('maxAge', 0).', public'; |
|
| 338 | 338 | $headers['Expires'] = gmdate( |
| 339 | 339 | 'D, d M Y H:i:s T', |
| 340 | 340 | time() + $bucket->getOption('maxAge', 0) |
@@ -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); |
@@ -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; |
@@ -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); |