diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-05 15:12:57 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-10-05 20:25:24 +0200 |
commit | d9015a8c94bfd71fe484618a06d276701d3bf9ff (patch) | |
tree | 3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/files_external/lib/Lib | |
parent | d357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff) | |
download | nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip |
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_external/lib/Lib')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FTP.php | 24 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/StorageConfig.php | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index d9e5e2a0d5a..60ee33facc0 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -47,17 +47,17 @@ class FTP extends StreamWrapper { public function __construct($params) { if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { - $this->host=$params['host']; - $this->user=$params['user']; - $this->password=$params['password']; + $this->host = $params['host']; + $this->user = $params['user']; + $this->password = $params['password']; if (isset($params['secure'])) { $this->secure = $params['secure']; } else { $this->secure = false; } - $this->root=isset($params['root'])?$params['root']:'/'; - if (! $this->root || $this->root[0]!=='/') { - $this->root='/'.$this->root; + $this->root = isset($params['root'])?$params['root']:'/'; + if (! $this->root || $this->root[0] !== '/') { + $this->root = '/'.$this->root; } if (substr($this->root, -1) !== '/') { $this->root .= '/'; @@ -77,11 +77,11 @@ class FTP extends StreamWrapper { * @return string */ public function constructUrl($path) { - $url='ftp'; + $url = 'ftp'; if ($this->secure) { - $url.='s'; + $url .= 's'; } - $url.='://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path; + $url .= '://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path; return $url; } @@ -120,10 +120,10 @@ class FTP extends StreamWrapper { case 'c': case 'c+': //emulate these - if (strrpos($path, '.')!==false) { - $ext=substr($path, strrpos($path, '.')); + if (strrpos($path, '.') !== false) { + $ext = substr($path, strrpos($path, '.')); } else { - $ext=''; + $ext = ''; } $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); if ($this->file_exists($path)) { diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index d1aea027cee..6921b157a20 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -86,7 +86,7 @@ class SFTP extends \OC\Files\Storage\Common { // Register sftp:// Stream::register(); - $parsedHost = $this->splitHost($params['host']); + $parsedHost = $this->splitHost($params['host']); $this->host = $parsedHost[0]; $this->port = $parsedHost[1]; @@ -404,7 +404,7 @@ class SFTP extends \OC\Files\Storage\Common { /** * {@inheritdoc} */ - public function touch($path, $mtime=null) { + public function touch($path, $mtime = null) { try { if (!is_null($mtime)) { return false; diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php index 7840b4c6dd8..ca26d49521c 100644 --- a/apps/files_external/lib/Lib/StorageConfig.php +++ b/apps/files_external/lib/Lib/StorageConfig.php @@ -184,7 +184,7 @@ class StorageConfig implements \JsonSerializable { * @param Backend $backend */ public function setBackend(Backend $backend) { - $this->backend= $backend; + $this->backend = $backend; } /** |