@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function setSecureConnection(bool $state) : ServiceInterface |
| 136 | 136 | { |
| 137 | - $this->setOption('secure', (bool)$state); |
|
| 137 | + $this->setOption('secure', (bool) $state); |
|
| 138 | 138 | |
| 139 | 139 | if (!empty($this->connectionId)) { |
| 140 | 140 | ftp_close($this->connectionId); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | public function setPassiveMode(bool $state) : ServiceInterface |
| 155 | 155 | { |
| 156 | - ftp_pasv($this->connectionId, (bool)$state); |
|
| 156 | + ftp_pasv($this->connectionId, (bool) $state); |
|
| 157 | 157 | return $this; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if (strpos($path, '/') !== 0) { |
| 173 | - $path = $this->getRemotePath() . $path; |
|
| 173 | + $path = $this->getRemotePath().$path; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | $chdirResult = @ftp_chdir($this->connectionId, $path); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function getRemotePath() : string |
| 191 | 191 | { |
| 192 | - return ftp_pwd($this->connectionId) . '/'; |
|
| 192 | + return ftp_pwd($this->connectionId).'/'; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | { |
| 203 | 203 | // if it's not an absolute path, we take it relative to the current folder |
| 204 | 204 | if (strpos($path, '/') !== 0) { |
| 205 | - $path = __DIR__ . '/' . $path; |
|
| 205 | + $path = __DIR__.'/'.$path; |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | if (!realpath($path) || !is_dir($path)) { |
@@ -280,8 +280,8 @@ discard block |
||
| 280 | 280 | 'Y-m-d H:i:s', |
| 281 | 281 | strtotime( |
| 282 | 282 | strpos($fileData['time'], ':') !== false |
| 283 | - ? $fileData['month'] . ' ' . $fileData['day'] . ' ' . date('Y') . ' ' . $fileData['time'] |
|
| 284 | - : $fileData['date'] . ' 12:00:00' |
|
| 283 | + ? $fileData['month'].' '.$fileData['day'].' '.date('Y').' '.$fileData['time'] |
|
| 284 | + : $fileData['date'].' 12:00:00' |
|
| 285 | 285 | ) |
| 286 | 286 | ), |
| 287 | 287 | 'basename' => $fileInfo['basename'], |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | $mode += $mapper[$i][$permissions[$i]] ?? 0; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - return (string)$mode; |
|
| 337 | + return (string) $mode; |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | /** |
@@ -367,14 +367,14 @@ discard block |
||
| 367 | 367 | $sourceFileName = $pathInfo['basename']; |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | - if (!file_exists($this->localPath . '/' . $sourceFileName)) { |
|
| 371 | - throw new RuntimeException(sprintf('File not found: %s', $this->localPath . '/' . $sourceFileName), 1007); |
|
| 370 | + if (!file_exists($this->localPath.'/'.$sourceFileName)) { |
|
| 371 | + throw new RuntimeException(sprintf('File not found: %s', $this->localPath.'/'.$sourceFileName), 1007); |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | $uploadResult = @ftp_put( |
| 375 | 375 | $this->connectionId, |
| 376 | 376 | $destinationFileName, |
| 377 | - $this->localPath . '/' . $sourceFileName, |
|
| 377 | + $this->localPath.'/'.$sourceFileName, |
|
| 378 | 378 | $fileMode |
| 379 | 379 | ); |
| 380 | 380 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | $downloadResult = @ftp_get( |
| 437 | 437 | $this->connectionId, |
| 438 | - $this->localPath . '/' . $localFileName, |
|
| 438 | + $this->localPath.'/'.$localFileName, |
|
| 439 | 439 | $remoteFileName, |
| 440 | 440 | $fileMode |
| 441 | 441 | ); |