Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpokhrel committed Apr 16, 2018
1 parent 29a7167 commit 50f3fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Tus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected function partial(bool $state = true)
$key = $this->getKey();

if (false !== strpos($key, self::PARTIAL_UPLOAD_NAME_SEPARATOR)) {
list($key) = explode(self::PARTIAL_UPLOAD_NAME_SEPARATOR, $key);
list($key, /* $partialKey */) = explode(self::PARTIAL_UPLOAD_NAME_SEPARATOR, $key);
}

$this->key = $key . uniqid(self::PARTIAL_UPLOAD_NAME_SEPARATOR);
Expand Down
6 changes: 3 additions & 3 deletions src/Tus/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function getChecksumAlgorithm()
return self::DEFAULT_CHECKSUM_ALGORITHM;
}

list($checksumAlgorithm) = explode(' ', $checksumHeader);
list($checksumAlgorithm, /* $checksum */) = explode(' ', $checksumHeader);

return $checksumAlgorithm;
}
Expand Down Expand Up @@ -659,7 +659,7 @@ protected function isExpired($contents) : bool
*/
protected function getPathForPartialUpload(string $key) : string
{
list($actualKey) = explode(self::PARTIAL_UPLOAD_NAME_SEPARATOR, $key);
list($actualKey, /* $partialUploadKey */) = explode(self::PARTIAL_UPLOAD_NAME_SEPARATOR, $key);

$path = $this->uploadDir . DIRECTORY_SEPARATOR . $actualKey . DIRECTORY_SEPARATOR;

Expand Down Expand Up @@ -761,7 +761,7 @@ protected function verifyChecksum(string $checksum, string $filePath) : bool
* @param string $method
* @param array $params
*
* @return HttpResponse|BinaryFileResponse
* @return HttpResponse
*/
public function __call(string $method, array $params)
{
Expand Down

0 comments on commit 50f3fd1

Please sign in to comment.