Completed
Pull Request — master (#607)
by Romain
01:52
created
src/Gaufrette/Adapter/Ftp.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -380,8 +380,7 @@
 block discarded – undo
380 380
         $chDirResult = false;
381 381
         try {
382 382
             $chDirResult = ftp_chdir($this->getConnection(), $directory)
383
-        }
384
-        catch(Exception $e) {
383
+        } catch(Exception $e) {
385 384
             $this->passive = true;
386 385
 
387 386
             // Build the FTP URL that will be used to check if the path is a directory or not
Please login to merge, or discard this patch.