Completed
Pull Request — master (#617)
by Nicolas
03:29
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/Adapter/Dropbox.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -162,6 +162,9 @@
 block discarded – undo
162 162
         }
163 163
     }
164 164
 
165
+    /**
166
+     * @param string $key
167
+     */
165 168
     private function getDropboxMetadata($key)
166 169
     {
167 170
         try {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 use Dropbox_API as DropboxApi;
9 9
 use Dropbox_Exception_NotFound as DropboxNotFoundException;
10 10
 
11
-@trigger_error('The ' . __NAMESPACE__ . '\Dropbox adapter is deprecated since version 0.4 and will be removed in 1.0. You can move to our Flysystem adapter and use their Dropbox adapter if needed.', E_USER_DEPRECATED);
11
+@trigger_error('The '.__NAMESPACE__.'\Dropbox adapter is deprecated since version 0.4 and will be removed in 1.0. You can move to our Flysystem adapter and use their Dropbox adapter if needed.', E_USER_DEPRECATED);
12 12
 
13 13
 /**
14 14
  * Dropbox adapter.
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/GoogleCloudStorage.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -349,6 +349,9 @@
 block discarded – undo
349 349
         }
350 350
     }
351 351
 
352
+    /**
353
+     * @param string $key
354
+     */
352 355
     protected function computePath($key)
353 356
     {
354 357
         if (empty($this->options['directory'])) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
      */
271 271
     public function isDirectory($key)
272 272
     {
273
-        if ($this->exists($key . '/')) {
273
+        if ($this->exists($key.'/')) {
274 274
             return true;
275 275
         }
276 276
 
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/OpenCloud.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @param string $key
86 86
      *
87
-     * @return string|bool if cannot read content
87
+     * @return string if cannot read content
88 88
      */
89 89
     public function read($key)
90 90
     {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      *
157 157
      * @param string $key
158 158
      *
159
-     * @return int|bool An UNIX like timestamp or false
159
+     * @return string|false An UNIX like timestamp or false
160 160
      */
161 161
     public function mtime($key)
162 162
     {
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/Apc.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
      * @param string $key    - by default ''
139 139
      * @param int    $format - by default APC_ITER_NONE
140 140
      *
141
-     * @return \APCIterator
141
+     * @return \Traversable
142 142
      */
143 143
     protected function getCachedKeysIterator($key = '', $format = APC_ITER_NONE)
144 144
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Gaufrette\Adapter;
6 6
 use Gaufrette\Util;
7 7
 
8
-@trigger_error('The ' . __NAMESPACE__ . '\Apc adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED);
8
+@trigger_error('The '.__NAMESPACE__.'\Apc adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED);
9 9
 
10 10
 /**
11 11
  * Apc adapter, a non-persistent adapter for when this sort of thing is appropriate.
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function computePath($key)
137 137
     {
138
-        return $this->prefix . $key;
138
+        return $this->prefix.$key;
139 139
     }
140 140
 
141 141
     /**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function getCachedKeysIterator($key = '', $format = APC_ITER_NONE)
148 148
     {
149
-        $pattern = sprintf('/^%s/', preg_quote($this->prefix . $key, '/'));
149
+        $pattern = sprintf('/^%s/', preg_quote($this->prefix.$key, '/'));
150 150
 
151 151
         return new \APCIterator('user', $pattern, $format);
152 152
     }
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/MogileFS.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     /**
251 251
      * Makes request to MogileFS tracker.
252 252
      *
253
-     * @param cmd Command
253
+     * @param cmd string
254 254
      * @param args Array of arguments
255 255
      *
256 256
      * @return mixed Array on success, false on failure
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     /**
303 303
      * Get file location at server from MogileFS tracker.
304 304
      *
305
-     * @param key File key
305
+     * @param key string key
306 306
      *
307 307
      * @return mixed Array on success, false on failure
308 308
      */
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      * Sends file to MogileFS tracker.
319 319
      *
320 320
      * @param path Save path at server
321
-     * @param data Data to save
321
+     * @param data string to save
322 322
      *
323 323
      * @return bool
324 324
      */
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Gaufrette\Adapter;
6 6
 use Gaufrette\Util;
7 7
 
8
-@trigger_error('The ' . __NAMESPACE__ . '\MogileFS adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED);
8
+@trigger_error('The '.__NAMESPACE__.'\MogileFS adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED);
9 9
 
10 10
 /**
11 11
  * Adapter for the MogileFS filesystem.
@@ -195,12 +195,12 @@  discard block
 block discarded – undo
195 195
         $domains = [];
196 196
 
197 197
         for ($i = 1; $i <= $res['domains']; ++$i) {
198
-            $dom = 'domain' . $i;
198
+            $dom = 'domain'.$i;
199 199
             $classes = [];
200 200
 
201 201
             // Associate classes to current domain (class name => mindevcount)
202
-            for ($j = 1; $j <= $res[$dom . 'classes']; ++$j) {
203
-                $classes[$res[$dom . 'class' . $j . 'name']] = $res[$dom . 'class' . $j . 'mindevcount'];
202
+            for ($j = 1; $j <= $res[$dom.'classes']; ++$j) {
203
+                $classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];
204 204
             }
205 205
 
206 206
             $domains[] = ['name' => $res[$dom], 'classes' => $classes];
@@ -347,11 +347,11 @@  discard block
 block discarded – undo
347 347
         stream_set_blocking($fp, true);
348 348
         stream_set_timeout($fp, 30, 200000);
349 349
 
350
-        $out = 'PUT ' . $url['path'] . ' HTTP/1.1' . $b;
351
-        $out .= 'Host: ' . $url['host'] . $b;
352
-        $out .= 'Content-Length: ' . Util\Size::fromContent($data) . $b . $b;
350
+        $out = 'PUT '.$url['path'].' HTTP/1.1'.$b;
351
+        $out .= 'Host: '.$url['host'].$b;
352
+        $out .= 'Content-Length: '.Util\Size::fromContent($data).$b.$b;
353 353
         $out .= $data;
354
-        $out .= $b . $b;
354
+        $out .= $b.$b;
355 355
         fwrite($fp, $out);
356 356
         fflush($fp);
357 357
 
Please login to merge, or discard this patch.