Completed
Push — master ( a78609...dfcc2e )
by Tobias
02:19
created
src/Gaufrette/Adapter/DoctrineDbal.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -152,6 +152,10 @@
 block discarded – undo
152 152
         return false;
153 153
     }
154 154
 
155
+    /**
156
+     * @param string $key
157
+     * @param string $column
158
+     */
155 159
     private function getColumnValue($key, $column)
156 160
     {
157 161
         $value = $this->connection->fetchColumn(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 
185 185
         return [
186 186
             'dirs' => [],
187
-            'keys' => array_map(function ($value) {
187
+            'keys' => array_map(function($value) {
188 188
                 return $value['_key'];
189 189
             },
190 190
                 $keys),
Please login to merge, or discard this patch.
src/Gaufrette/Util/Path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             }
42 42
         }
43 43
 
44
-        return $prefix . implode('/', $tokens);
44
+        return $prefix.implode('/', $tokens);
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Local.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
     {
206 206
         $this->ensureDirectoryExists($this->directory, $this->create);
207 207
 
208
-        return $this->normalizePath($this->directory . '/' . $key);
208
+        return $this->normalizePath($this->directory.'/'.$key);
209 209
     }
210 210
 
211 211
     /**
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Flysystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function keys()
60 60
     {
61
-        return array_map(function ($content) {
61
+        return array_map(function($content) {
62 62
             return $content['path'];
63 63
         }, $this->adapter->listContents());
64 64
     }
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Zip.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
      * Returns the stat of a file in the zip archive
136 136
      *  (name, index, crc, mtime, compression size, compression method, filesize).
137 137
      *
138
-     * @param $key
138
+     * @param string $key
139 139
      *
140 140
      * @return array|bool
141 141
      */
Please login to merge, or discard this patch.
Switch Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -166,46 +166,46 @@
 block discarded – undo
166 166
 
167 167
         if (true !== ($resultCode = $this->zipArchive->open($this->zipFile, ZipArchive::CREATE))) {
168 168
             switch ($resultCode) {
169
-            case ZipArchive::ER_EXISTS:
170
-                $errMsg = 'File already exists.';
169
+                case ZipArchive::ER_EXISTS:
170
+                    $errMsg = 'File already exists.';
171 171
 
172
-                break;
173
-            case ZipArchive::ER_INCONS:
174
-                $errMsg = 'Zip archive inconsistent.';
172
+                    break;
173
+                case ZipArchive::ER_INCONS:
174
+                    $errMsg = 'Zip archive inconsistent.';
175 175
 
176
-                break;
177
-            case ZipArchive::ER_INVAL:
178
-                $errMsg = 'Invalid argument.';
176
+                    break;
177
+                case ZipArchive::ER_INVAL:
178
+                    $errMsg = 'Invalid argument.';
179 179
 
180
-                break;
181
-            case ZipArchive::ER_MEMORY:
182
-                $errMsg = 'Malloc failure.';
180
+                    break;
181
+                case ZipArchive::ER_MEMORY:
182
+                    $errMsg = 'Malloc failure.';
183 183
 
184
-                break;
185
-            case ZipArchive::ER_NOENT:
186
-                $errMsg = 'Invalid argument.';
184
+                    break;
185
+                case ZipArchive::ER_NOENT:
186
+                    $errMsg = 'Invalid argument.';
187 187
 
188
-                break;
189
-            case ZipArchive::ER_NOZIP:
190
-                $errMsg = 'Not a zip archive.';
188
+                    break;
189
+                case ZipArchive::ER_NOZIP:
190
+                    $errMsg = 'Not a zip archive.';
191 191
 
192
-                break;
193
-            case ZipArchive::ER_OPEN:
194
-                $errMsg = 'Can\'t open file.';
192
+                    break;
193
+                case ZipArchive::ER_OPEN:
194
+                    $errMsg = 'Can\'t open file.';
195 195
 
196
-                break;
197
-            case ZipArchive::ER_READ:
198
-                $errMsg = 'Read error.';
196
+                    break;
197
+                case ZipArchive::ER_READ:
198
+                    $errMsg = 'Read error.';
199 199
 
200
-                break;
201
-            case ZipArchive::ER_SEEK:
202
-                $errMsg = 'Seek error.';
200
+                    break;
201
+                case ZipArchive::ER_SEEK:
202
+                    $errMsg = 'Seek error.';
203 203
 
204
-                break;
205
-            default:
206
-                $errMsg = 'Unknown error.';
204
+                    break;
205
+                default:
206
+                    $errMsg = 'Unknown error.';
207 207
 
208
-                break;
208
+                    break;
209 209
             }
210 210
 
211 211
             throw new \RuntimeException(sprintf('%s', $errMsg));
Please login to merge, or discard this patch.
src/Gaufrette/StreamWrapper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
     /**
214 214
      * @param string $path
215 215
      *
216
-     * @return mixed
216
+     * @return boolean
217 217
      */
218 218
     public function unlink($path)
219 219
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,11 +257,11 @@
 block discarded – undo
257 257
         $key = substr($parts['path'], 1);
258 258
 
259 259
         if (null !== $parts['query']) {
260
-            $key .= '?' . $parts['query'];
260
+            $key .= '?'.$parts['query'];
261 261
         }
262 262
 
263 263
         if (null !== $parts['fragment']) {
264
-            $key .= '#' . $parts['fragment'];
264
+            $key .= '#'.$parts['fragment'];
265 265
         }
266 266
 
267 267
         if (empty($domain) || empty($key)) {
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/AzureBlobStorage.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     }
459 459
 
460 460
     /**
461
-     * @param string|resource $content
461
+     * @param string $content
462 462
      *
463 463
      * @return string
464 464
      */
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
     /**
477 477
      * @param string $key
478 478
      *
479
-     * @return array
479
+     * @return string[]
480 480
      * @throws \InvalidArgumentException
481 481
      */
482 482
     private function tokenizeKey($key)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                 $containersList = $this->blobProxy->listContainers();
274 274
 
275 275
                 return call_user_func_array('array_merge', array_map(
276
-                    function (Container $container) {
276
+                    function(Container $container) {
277 277
                         $containerName = $container->getName();
278 278
 
279 279
                         return $this->fetchBlobs($containerName, $containerName);
@@ -567,10 +567,10 @@  discard block
 block discarded – undo
567 567
         $blobList = $this->blobProxy->listBlobs($containerName);
568 568
 
569 569
         return array_map(
570
-            function (Blob $blob) use ($prefix) {
570
+            function(Blob $blob) use ($prefix) {
571 571
                 $name = $blob->getName();
572 572
                 if (null !== $prefix) {
573
-                    $name = $prefix . '/' . $name;
573
+                    $name = $prefix.'/'.$name;
574 574
                 }
575 575
 
576 576
                 return $name;
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/AwsS3.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -307,6 +307,9 @@  discard block
 block discarded – undo
307 307
         return true;
308 308
     }
309 309
 
310
+    /**
311
+     * @param string $key
312
+     */
310 313
     protected function getOptions($key, array $options = [])
311 314
     {
312 315
         $options['ACL'] = $this->options['acl'];
@@ -322,6 +325,9 @@  discard block
 block discarded – undo
322 325
         return $options;
323 326
     }
324 327
 
328
+    /**
329
+     * @return string
330
+     */
325 331
     protected function computePath($key)
326 332
     {
327 333
         if (empty($this->options['directory'])) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $this->ensureBucketExists();
140 140
         $options = $this->getOptions(
141 141
             $targetKey,
142
-            ['CopySource' => $this->bucket . '/' . $this->computePath($sourceKey)]
142
+            ['CopySource' => $this->bucket.'/'.$this->computePath($sourceKey)]
143 143
         );
144 144
 
145 145
         try {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     {
269 269
         $result = $this->service->listObjects([
270 270
             'Bucket' => $this->bucket,
271
-            'Prefix' => rtrim($this->computePath($key), '/') . '/',
271
+            'Prefix' => rtrim($this->computePath($key), '/').'/',
272 272
             'MaxKeys' => 1,
273 273
         ]);
274 274
         if (isset($result['Contents'])) {
Please login to merge, or discard this patch.
src/Gaufrette/Filesystem.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -241,6 +241,7 @@
 block discarded – undo
241 241
 
242 242
     /**
243 243
      * {@inheritdoc}
244
+     * @param string $key
244 245
      */
245 246
     public function createFile($key)
246 247
     {
Please login to merge, or discard this patch.