Completed
Push — master ( da1891...eebb53 )
by Anton
03:32
created
source/Spiral/ODM/Document.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         if ($this->isEmbedded()) {
146 146
             throw new DocumentException(
147
-                "Embedded document '" . get_class($this) . "' can not be saved into collection."
147
+                "Embedded document '".get_class($this)."' can not be saved into collection."
148 148
             );
149 149
         }
150 150
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         if ($this->isEmbedded()) {
186 186
             throw new DocumentException(
187
-                "Embedded document '" . get_class($this) . "' can not be deleted from collection."
187
+                "Embedded document '".get_class($this)."' can not be deleted from collection."
188 188
             );
189 189
         }
190 190
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         }
262 262
 
263 263
         return [
264
-            'collection' => $this->odmSchema()[ODM::D_DB] . '/' . $this->collection,
264
+            'collection' => $this->odmSchema()[ODM::D_DB].'/'.$this->collection,
265 265
             'fields'     => $this->getFields(),
266 266
             'atomics'    => $this->hasUpdates() ? $this->buildAtomics() : [],
267 267
             'errors'     => $this->getErrors()
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     protected function interpolateQuery(array $query)
325 325
     {
326 326
         $fields = $this->fields;
327
-        array_walk_recursive($query, function (&$value) use ($fields) {
327
+        array_walk_recursive($query, function(&$value) use ($fields) {
328 328
             if (strpos($value, 'self::') === 0) {
329 329
                 $value = $this->dotGet(substr($value, 6));
330 330
             }
Please login to merge, or discard this patch.
source/Spiral/ODM/ODM.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@
 block discarded – undo
316 316
      */
317 317
     public function primaryDocument($database, $collection)
318 318
     {
319
-        return $this->schema($database . '/' . $collection);
319
+        return $this->schema($database.'/'.$collection);
320 320
     }
321 321
 
322 322
     /**
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
         if (!$hideHeader && !empty($name)) {
121 121
             //Showing element name (if any provided)
122
-            $header = $indent . $this->style->style($name, "name");
122
+            $header = $indent.$this->style->style($name, "name");
123 123
 
124 124
             //Showing equal sing
125 125
             $header .= $this->style->style(" = ", "syntax", "=");
@@ -129,24 +129,24 @@  discard block
 block discarded – undo
129 129
 
130 130
         if ($level > $this->maxLevel) {
131 131
             //Dumper is not reference based, we can't dump too deep values
132
-            return $indent . $this->style->style('-too deep-', 'maxLevel') . "\n";
132
+            return $indent.$this->style->style('-too deep-', 'maxLevel')."\n";
133 133
         }
134 134
 
135 135
         $type = strtolower(gettype($value));
136 136
 
137 137
         if ($type == 'array') {
138
-            return $header . $this->dumpArray($value, $level, $hideHeader);
138
+            return $header.$this->dumpArray($value, $level, $hideHeader);
139 139
         }
140 140
 
141 141
         if ($type == 'object') {
142
-            return $header . $this->dumpObject($value, $level, $hideHeader);
142
+            return $header.$this->dumpObject($value, $level, $hideHeader);
143 143
         }
144 144
 
145 145
         if ($type == 'resource') {
146 146
             //No need to dump resource value
147
-            $element = get_resource_type($value) . " resource ";
147
+            $element = get_resource_type($value)." resource ";
148 148
 
149
-            return $header . $this->style->style($element, "type", "resource") . "\n";
149
+            return $header.$this->style->style($element, "type", "resource")."\n";
150 150
         }
151 151
 
152 152
         //Value length
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         }
174 174
 
175 175
         //Including value
176
-        return $header . " " . $this->style->style($element, "value", $type) . "\n";
176
+        return $header." ".$this->style->style($element, "value", $type)."\n";
177 177
     }
178 178
 
179 179
     /**
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
             $count = count($array);
191 191
 
192 192
             //Array size and scope
193
-            $output = $this->style->style("array({$count})", "type", "array") . "\n";
194
-            $output .= $indent . $this->style->style("[", "syntax", "[") . "\n";
193
+            $output = $this->style->style("array({$count})", "type", "array")."\n";
194
+            $output .= $indent.$this->style->style("[", "syntax", "[")."\n";
195 195
         } else {
196 196
             $output = '';
197 197
         }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
         if (!$hideHeader) {
212 212
             //Closing array scope
213
-            $output .= $indent . $this->style->style("]", "syntax", "]") . "\n";
213
+            $output .= $indent.$this->style->style("]", "syntax", "]")."\n";
214 214
         }
215 215
 
216 216
         return $output;
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
         $indent = $this->style->indent($level);
229 229
 
230 230
         if (!$hideHeader) {
231
-            $type = ($class ?: get_class($object)) . " object ";
231
+            $type = ($class ?: get_class($object))." object ";
232 232
 
233
-            $header = $this->style->style($type, "type", "object") . "\n";
234
-            $header .= $indent . $this->style->style("(", "syntax", "(") . "\n";
233
+            $header = $this->style->style($type, "type", "object")."\n";
234
+            $header .= $indent.$this->style->style("(", "syntax", "(")."\n";
235 235
         } else {
236 236
             $header = '';
237 237
         }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
             return $header
254 254
             . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
255
-            . $indent . $this->style->style(")", "syntax", ")") . "\n";
255
+            . $indent.$this->style->style(")", "syntax", ")")."\n";
256 256
         }
257 257
 
258 258
         if ($object instanceof \Closure) {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         }
269 269
 
270 270
         //Header, content, footer
271
-        return $header . $output . $indent . $this->style->style(")", "syntax", ")") . "\n";
271
+        return $header.$output.$indent.$this->style->style(")", "syntax", ")")."\n";
272 272
     }
273 273
 
274 274
     /**
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         }
304 304
 
305 305
         //Property name includes access level
306
-        $name = $property->getName() . $this->style->style(":" . $access, "access", $access);
306
+        $name = $property->getName().$this->style->style(":".$access, "access", $access);
307 307
 
308 308
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
309 309
     }
Please login to merge, or discard this patch.
source/Spiral/Models/DataEntity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 break;
158 158
             default:
159 159
                 throw new EntityException(
160
-                    "Undefined field format '" . static::FIELD_FORMAT . "'."
160
+                    "Undefined field format '".static::FIELD_FORMAT."'."
161 161
                 );
162 162
         }
163 163
 
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
     {
557 557
         //We do support 3 mutators: getter, setter and accessor, all of them can be
558 558
         //referenced to valid field name by adding "s" at the end
559
-        $mutator = $mutator . 's';
559
+        $mutator = $mutator.'s';
560 560
 
561 561
         if (isset($this->{$mutator}[$field])) {
562 562
             return $this->{$mutator}[$field];
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/LocalServer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,11 +190,11 @@
 block discarded – undo
190 190
     protected function getPath(BucketInterface $bucket, $name)
191 191
     {
192 192
         if (empty($this->options['home'])) {
193
-            return $this->files->normalizePath($bucket->getOption('directory') . $name);
193
+            return $this->files->normalizePath($bucket->getOption('directory').$name);
194 194
         }
195 195
 
196 196
         return $this->files->normalizePath(
197
-            $this->options['home'] . '/' . $bucket->getOption('directory') . $name
197
+            $this->options['home'].'/'.$bucket->getOption('directory').$name
198 198
         );
199 199
     }
200 200
 }
201 201
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/RackspaceServer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 
84 84
         if ($this->options['cache']) {
85 85
             $this->authToken = $this->store->get(
86
-                $this->options['username'] . '@rackspace-token'
86
+                $this->options['username'].'@rackspace-token'
87 87
             );
88 88
 
89 89
             $this->regions = (array)$this->store->get(
90
-                $this->options['username'] . '@rackspace-regions'
90
+                $this->options['username'].'@rackspace-regions'
91 91
             );
92 92
         }
93 93
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         try {
227 227
             $request = $this->buildRequest('PUT', $bucket, $newname, [
228
-                'X-Copy-From'    => '/' . $bucket->getOption('container') . '/' . rawurlencode($oldname),
228
+                'X-Copy-From'    => '/'.$bucket->getOption('container').'/'.rawurlencode($oldname),
229 229
                 'Content-Length' => 0
230 230
             ]);
231 231
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
         try {
264 264
             $request = $this->buildRequest('PUT', $destination, $name, [
265
-                'X-Copy-From'    => '/' . $bucket->getOPtion('container') . '/' . rawurlencode($name),
265
+                'X-Copy-From'    => '/'.$bucket->getOPtion('container').'/'.rawurlencode($name),
266 266
                 'Content-Length' => 0
267 267
             ]);
268 268
 
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 
340 340
         if ($this->options['cache']) {
341 341
             $this->store->set(
342
-                $this->options['username'] . '@rackspace-token',
342
+                $this->options['username'].'@rackspace-token',
343 343
                 $this->authToken,
344 344
                 $this->options['lifetime']
345 345
             );
346 346
 
347 347
             $this->store->set(
348
-                $this->options['username'] . '@rackspace-regions',
348
+                $this->options['username'].'@rackspace-regions',
349 349
                 $this->regions,
350 350
                 $this->options['lifetime']
351 351
             );
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         }
384 384
 
385 385
         return new Uri(
386
-            $this->regions[$region] . '/' . $bucket->getOption('container') . '/' . rawurlencode($name)
386
+            $this->regions[$region].'/'.$bucket->getOption('container').'/'.rawurlencode($name)
387 387
         );
388 388
     }
389 389
 
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/AmazonServer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     protected function buildUri(BucketInterface $bucket, $name)
215 215
     {
216 216
         return new Uri(
217
-            $this->options['server'] . '/' . $bucket->getOption('bucket') . '/' . rawurlencode($name)
217
+            $this->options['server'].'/'.$bucket->getOption('bucket').'/'.rawurlencode($name)
218 218
         );
219 219
     }
220 220
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $headers = [];
261 261
         foreach ($commands as $command => $value) {
262
-            $headers['X-Amz-' . $command] = $value;
262
+            $headers['X-Amz-'.$command] = $value;
263 263
         }
264 264
 
265 265
         return $headers;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $normalizedCommands = [];
286 286
         foreach ($packedCommands as $command => $value) {
287 287
             if (!empty($value)) {
288
-                $normalizedCommands[] = strtolower($command) . ':' . $value;
288
+                $normalizedCommands[] = strtolower($command).':'.$value;
289 289
             }
290 290
         }
291 291
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
         return $request->withAddedHeader(
300 300
             'Authorization',
301
-            'AWS ' . $this->options['accessKey'] . ':' . base64_encode(
301
+            'AWS '.$this->options['accessKey'].':'.base64_encode(
302 302
                 hash_hmac('sha1', join("\n", $signature), $this->options['secretKey'], true)
303 303
             )
304 304
         );
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
         if (!empty($maxAge = $bucket->getOption('maxAge', 0))) {
324 324
             //Shortcut
325
-            $headers['Cache-control'] = 'max-age=' . $bucket->getOption('maxAge', 0) . ', public';
325
+            $headers['Cache-control'] = 'max-age='.$bucket->getOption('maxAge', 0).', public';
326 326
             $headers['Expires'] = gmdate(
327 327
                 'D, d M Y H:i:s T',
328 328
                 time() + $bucket->getOption('maxAge', 0)
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/SftpServer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     protected function getPath(BucketInterface $bucket, $name)
219 219
     {
220 220
         return $this->files->normalizePath(
221
-            $this->options['home'] . '/' . $bucket->getOption('directory') . '/' . $name
221
+            $this->options['home'].'/'.$bucket->getOption('directory').'/'.$name
222 222
         );
223 223
     }
224 224
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function getUri(BucketInterface $bucket, $name)
234 234
     {
235
-        return 'ssh2.sftp://' . $this->sftp . $this->getPath($bucket, $name);
235
+        return 'ssh2.sftp://'.$this->sftp.$this->getPath($bucket, $name);
236 236
     }
237 237
 
238 238
     /**
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $directory = dirname($this->getPath($bucket, $name));
249 249
 
250 250
         $mode = $bucket->getOption('mode', FilesInterface::RUNTIME);
251
-        if (file_exists('ssh2.sftp://' . $this->sftp . $directory)) {
251
+        if (file_exists('ssh2.sftp://'.$this->sftp.$directory)) {
252 252
             if (function_exists('ssh2_sftp_chmod')) {
253 253
                 ssh2_sftp_chmod($this->sftp, $directory, $mode | 0111);
254 254
             }
@@ -264,9 +264,9 @@  discard block
 block discarded – undo
264 264
                 continue;
265 265
             }
266 266
 
267
-            $location .= '/' . $directory;
267
+            $location .= '/'.$directory;
268 268
 
269
-            if (!file_exists('ssh2.sftp://' . $this->sftp . $location)) {
269
+            if (!file_exists('ssh2.sftp://'.$this->sftp.$location)) {
270 270
                 if (!ssh2_sftp_mkdir($this->sftp, $location)) {
271 271
                     throw new ServerException(
272 272
                         "Unable to create directory {$location} using sftp connection."
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/FtpServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@
 block discarded – undo
255 255
     protected function getPath(BucketInterface $bucket, $name)
256 256
     {
257 257
         return $this->files->normalizePath(
258
-            $this->options['home'] . '/' . $bucket->getOption('directory') . $name
258
+            $this->options['home'].'/'.$bucket->getOption('directory').$name
259 259
         );
260 260
     }
261 261
 
Please login to merge, or discard this patch.