@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->connection = new Curl(); |
60 | 60 | $this->connection->setOptions([ |
61 | 61 | CURLOPT_URL => $this->getUrl(), |
62 | - CURLOPT_USERPWD => $this->getUsername() . ':' . $this->getPassword(), |
|
62 | + CURLOPT_USERPWD => $this->getUsername().':'.$this->getPassword(), |
|
63 | 63 | CURLOPT_SSL_VERIFYPEER => false, |
64 | 64 | CURLOPT_SSL_VERIFYHOST => false, |
65 | 65 | CURLOPT_FTP_SSL => CURLFTPSSL_TRY, |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $connection = $this->getConnection(); |
133 | 133 | |
134 | 134 | $result = $connection->exec([ |
135 | - CURLOPT_URL => $this->getUrl() . '/' . $path, |
|
135 | + CURLOPT_URL => $this->getUrl().'/'.$path, |
|
136 | 136 | CURLOPT_UPLOAD => 1, |
137 | 137 | CURLOPT_INFILE => $resource, |
138 | 138 | ]); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $connection = $this->getConnection(); |
188 | 188 | |
189 | 189 | $result = $connection->exec([ |
190 | - CURLOPT_POSTQUOTE => ['RNFR ' . $path, 'RNTO ' . $newpath], |
|
190 | + CURLOPT_POSTQUOTE => ['RNFR '.$path, 'RNTO '.$newpath], |
|
191 | 191 | ]); |
192 | 192 | |
193 | 193 | return $result !== false; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $connection = $this->getConnection(); |
225 | 225 | |
226 | 226 | $result = $connection->exec([ |
227 | - CURLOPT_POSTQUOTE => ['DELE ' . $path], |
|
227 | + CURLOPT_POSTQUOTE => ['DELE '.$path], |
|
228 | 228 | ]); |
229 | 229 | |
230 | 230 | return $result !== false; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $connection = $this->getConnection(); |
243 | 243 | |
244 | 244 | $result = $connection->exec([ |
245 | - CURLOPT_POSTQUOTE => ['RMD ' . $dirname], |
|
245 | + CURLOPT_POSTQUOTE => ['RMD '.$dirname], |
|
246 | 246 | ]); |
247 | 247 | |
248 | 248 | return $result !== false; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $connection = $this->getConnection(); |
262 | 262 | |
263 | 263 | $result = $connection->exec([ |
264 | - CURLOPT_POSTQUOTE => ['MKD ' . $dirname], |
|
264 | + CURLOPT_POSTQUOTE => ['MKD '.$dirname], |
|
265 | 265 | ]); |
266 | 266 | |
267 | 267 | if ($result === false) { |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $connection = $this->getConnection(); |
332 | 332 | |
333 | 333 | $result = $connection->exec([ |
334 | - CURLOPT_URL => $this->getUrl() . '/' . $path, |
|
334 | + CURLOPT_URL => $this->getUrl().'/'.$path, |
|
335 | 335 | CURLOPT_FILE => $stream, |
336 | 336 | ]); |
337 | 337 | |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | return false; |
374 | 374 | } |
375 | 375 | |
376 | - $file = array_filter($listing, function ($item) use ($path) { |
|
376 | + $file = array_filter($listing, function($item) use ($path) { |
|
377 | 377 | return Normalizer::normalize($item['path']) === Normalizer::normalize($path); |
378 | 378 | }); |
379 | 379 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function getTimestamp($path) |
409 | 409 | { |
410 | - $response = $this->rawCommand('MDTM ' . $path); |
|
410 | + $response = $this->rawCommand('MDTM '.$path); |
|
411 | 411 | list($code, $time) = explode(' ', end($response), 2); |
412 | 412 | if ($code !== '213') { |
413 | 413 | return false; |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | } |
431 | 431 | |
432 | 432 | $options = $recursive ? '-alnR' : '-aln'; |
433 | - $request = rtrim("LIST $options " . $this->normalizePath($directory)); |
|
433 | + $request = rtrim("LIST $options ".$this->normalizePath($directory)); |
|
434 | 434 | |
435 | 435 | $connection = $this->getConnection(); |
436 | 436 | $result = $connection->exec([CURLOPT_CUSTOMREQUEST => $request]); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | */ |
453 | 453 | protected function listDirectoryContentsRecursive($directory) |
454 | 454 | { |
455 | - $request = rtrim('LIST -aln ' . $this->normalizePath($directory)); |
|
455 | + $request = rtrim('LIST -aln '.$this->normalizePath($directory)); |
|
456 | 456 | |
457 | 457 | $connection = $this->getConnection(); |
458 | 458 | $result = $connection->exec([CURLOPT_CUSTOMREQUEST => $request]); |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | protected function rawCommand($command) |
515 | 515 | { |
516 | 516 | $response = ''; |
517 | - $callback = function ($ch, $string) use (&$response) { |
|
517 | + $callback = function($ch, $string) use (&$response) { |
|
518 | 518 | $response .= $string; |
519 | 519 | |
520 | 520 | return strlen($string); |
@@ -530,6 +530,6 @@ discard block |
||
530 | 530 | |
531 | 531 | protected function getUrl() |
532 | 532 | { |
533 | - return $this->protocol . '://' . $this->getHost() . ':' . $this->getPort(); |
|
533 | + return $this->protocol.'://'.$this->getHost().':'.$this->getPort(); |
|
534 | 534 | } |
535 | 535 | } |