@@ -8,8 +8,8 @@ |
||
8 | 8 | use Gaufrette\File; |
9 | 9 | |
10 | 10 | class PhpseclibSftp implements Adapter, |
11 | - FileFactory, |
|
12 | - ListKeysAware |
|
11 | + FileFactory, |
|
12 | + ListKeysAware |
|
13 | 13 | { |
14 | 14 | protected $sftp; |
15 | 15 | protected $directory; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @author Daniel Richter <[email protected]> |
19 | 19 | */ |
20 | 20 | class OpenCloud implements Adapter, |
21 | - ChecksumCalculator |
|
21 | + ChecksumCalculator |
|
22 | 22 | { |
23 | 23 | /** |
24 | 24 | * @var Service |
@@ -15,8 +15,8 @@ |
||
15 | 15 | * @author Leszek Prabucki <[email protected]> |
16 | 16 | */ |
17 | 17 | class DoctrineDbal implements Adapter, |
18 | - ChecksumCalculator, |
|
19 | - ListKeysAware |
|
18 | + ChecksumCalculator, |
|
19 | + ListKeysAware |
|
20 | 20 | { |
21 | 21 | protected $connection; |
22 | 22 | protected $table; |
@@ -183,7 +183,7 @@ |
||
183 | 183 | |
184 | 184 | return array( |
185 | 185 | 'dirs' => array(), |
186 | - 'keys' => array_map(function ($value) { |
|
186 | + 'keys' => array_map(function($value) { |
|
187 | 187 | return $value['_key']; |
188 | 188 | }, |
189 | 189 | $keys), |
@@ -89,7 +89,7 @@ |
||
89 | 89 | |
90 | 90 | if ($status) { |
91 | 91 | $params = array('key' => $key, 'class' => $metadata['mogile_class'], 'devid' => $res['devid'], |
92 | - 'fid' => $res['fid'], 'path' => urldecode($res['path']), ); |
|
92 | + 'fid' => $res['fid'], 'path' => urldecode($res['path']),); |
|
93 | 93 | $closeres = $this->doRequest('CREATE_CLOSE', $params); |
94 | 94 | } |
95 | 95 | } |
@@ -58,7 +58,7 @@ |
||
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 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * @author Antoine Hérault <[email protected]> |
14 | 14 | */ |
15 | 15 | class InMemory implements Adapter, |
16 | - MimeTypeProvider |
|
16 | + MimeTypeProvider |
|
17 | 17 | { |
18 | 18 | protected $files = array(); |
19 | 19 |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | * @author Antoine Hérault <[email protected]> |
13 | 13 | */ |
14 | 14 | class Ftp implements Adapter, |
15 | - FileFactory, |
|
16 | - ListKeysAware, |
|
17 | - SizeCalculator |
|
15 | + FileFactory, |
|
16 | + ListKeysAware, |
|
17 | + SizeCalculator |
|
18 | 18 | { |
19 | 19 | protected $connection = null; |
20 | 20 | protected $directory; |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | $this->fileData = array_merge($fileData, $this->fileData); |
264 | 264 | |
265 | 265 | return array( |
266 | - 'keys' => array_keys($fileData), |
|
267 | - 'dirs' => $dirs, |
|
266 | + 'keys' => array_keys($fileData), |
|
267 | + 'dirs' => $dirs, |
|
268 | 268 | ); |
269 | 269 | } |
270 | 270 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $this->ensureDirectoryExists($this->directory, $this->create); |
125 | 125 | |
126 | 126 | $file = $this->computePath($key); |
127 | - $lines = ftp_rawlist($this->getConnection(), '-al ' . \Gaufrette\Util\Path::dirname($file)); |
|
127 | + $lines = ftp_rawlist($this->getConnection(), '-al '.\Gaufrette\Util\Path::dirname($file)); |
|
128 | 128 | |
129 | 129 | if (false === $lines) { |
130 | 130 | return false; |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | */ |
361 | 361 | private function createConnectionUrl() { |
362 | 362 | $url = $this->ssl ? 'sftp://' : 'ftp://'; |
363 | - $url .= $this->username . ':' . $this->password . '@' . $this->host; |
|
364 | - $url .= $this->port ? ':' . $this->port : ''; |
|
363 | + $url .= $this->username.':'.$this->password.'@'.$this->host; |
|
364 | + $url .= $this->port ? ':'.$this->port : ''; |
|
365 | 365 | |
366 | 366 | return $url; |
367 | 367 | } |
@@ -381,13 +381,13 @@ discard block |
||
381 | 381 | try { |
382 | 382 | $chDirResult = ftp_chdir($this->getConnection(), $directory) |
383 | 383 | } |
384 | - catch(Exception $e) { |
|
384 | + catch (Exception $e) { |
|
385 | 385 | $this->passive = true; |
386 | 386 | |
387 | 387 | // Build the FTP URL that will be used to check if the path is a directory or not |
388 | 388 | $url = $this->createConnectionUrl(); |
389 | 389 | |
390 | - if (!@is_dir($url . $directory)) { |
|
390 | + if (!@is_dir($url.$directory)) { |
|
391 | 391 | return false; |
392 | 392 | } |
393 | 393 | } |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | } |
579 | 579 | |
580 | 580 | // enable utf8 mode if configured |
581 | - if($this->utf8 == true) { |
|
581 | + if ($this->utf8 == true) { |
|
582 | 582 | ftp_raw($this->connection, "OPTS UTF8 ON"); |
583 | 583 | } |
584 | 584 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * @deprecated The AclAwareAmazonS3 adapter is deprecated since version 0.4 and will be removed in 1.0. Use the AwsS3 adapter instead. |
20 | 20 | */ |
21 | 21 | class AclAwareAmazonS3 implements Adapter, |
22 | - MetadataSupporter |
|
22 | + MetadataSupporter |
|
23 | 23 | { |
24 | 24 | protected $delegate; |
25 | 25 | protected $s3; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @deprecated The AmazonS3 adapter is deprecated since version 0.4 and will be removed in 1.0. Use the AwsS3 adapter instead. |
19 | 19 | */ |
20 | 20 | class AmazonS3 implements Adapter, |
21 | - MetadataSupporter |
|
21 | + MetadataSupporter |
|
22 | 22 | { |
23 | 23 | protected $service; |
24 | 24 | protected $bucket; |