Skip to content

Commit

Permalink
Merge pull request #40852 from owncloud/php-cs-fixer-3.20.0
Browse files Browse the repository at this point in the history
Apply code-style changes from php-cs-fixer 3.20
  • Loading branch information
phil-davis authored Jun 28, 2023
2 parents 6e60f1c + 64936fd commit ea7997e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/files/lib/Command/Scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected function scanFiles($user, $path, $verbose, OutputInterface $output, $b
$scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) {
$output->writeln("Error while scanning, storage not available (" . $e->getMessage() . ")");
});
# count only
# count only
} else {
$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function () {
$this->filesCounter += 1;
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/private/App/InfoParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected function xmlToArray($xml) {
} else {
$array[$element] = $data;
}
// Just a value
// Just a value
} else {
if ($totalElement > 1) {
$array[$element][] = $this->xmlToArray($node);
Expand Down
4 changes: 2 additions & 2 deletions lib/private/AppFramework/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ protected function decodeContent() {
}
}

// Handle application/x-www-form-urlencoded for methods other than GET
// or post correctly
// Handle application/x-www-form-urlencoded for methods other than GET
// or post correctly
} elseif ($this->method !== 'GET'
&& $this->method !== 'POST'
&& \strpos($this->getHeader('Content-Type'), 'application/x-www-form-urlencoded') !== false) {
Expand Down
6 changes: 3 additions & 3 deletions lib/private/Files/Stream/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function stream_read($count) {
$result .= \substr($this->cache, $blockPosition, $remainingLength);
$this->position += $remainingLength;
$count = 0;
// otherwise remainder of current block is fetched, the block is flushed and the position updated
// otherwise remainder of current block is fetched, the block is flushed and the position updated
} else {
$result .= \substr($this->cache, $blockPosition);
$this->flush();
Expand Down Expand Up @@ -359,8 +359,8 @@ public function stream_write($data) {
$this->position += $remainingLength;
$length += $remainingLength;
$data = '';
// if $data doesn't fit the current block, the fill the current block and reiterate
// after the block is filled, it is flushed and $data is updatedxxx
// if $data doesn't fit the current block, the fill the current block and reiterate
// after the block is filled, it is flushed and $data is updatedxxx
} else {
$this->cache = \substr($this->cache, 0, $blockPosition) .
\substr($data, 0, $this->unencryptedBlockSize - $blockPosition);
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,14 @@ public function rename($path1, $path2) {
} else {
$result = false;
}
// moving a file/folder within the same mount point
// moving a file/folder within the same mount point
} elseif ($storage1 === $storage2) {
if ($storage1) {
$result = $storage1->rename($internalPath1, $internalPath2);
} else {
$result = false;
}
// moving a file/folder between storages (from $storage1 to $storage2)
// moving a file/folder between storages (from $storage1 to $storage2)
} else {
$result = $storage2->moveFromStorage($storage1, $internalPath1, $internalPath2);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/private/Share/Share.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,9 @@ public static function unshare($itemType, $itemSource, $shareType, $shareWith, $
// delete the item with the expected share_type and owner
if ((int)$item['share_type'] === (int)$shareType && $item['uid_owner'] === $currentUser) {
$toDelete = $item;
// if there is more then one result we don't have to delete the children
// but update their parent. For group shares the new parent should always be
// the original group share and not the db entry with the unique name
// if there is more then one result we don't have to delete the children
// but update their parent. For group shares the new parent should always be
// the original group share and not the db entry with the unique name
} elseif ((int)$item['share_type'] === self::$shareTypeGroupUserUnique) {
$newParent = $item['parent'];
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static function sendHeaders($filename, $name, array $rangeArray) {
\header('Accept-Ranges: bytes', true);
if (\count($rangeArray) > 1) {
$type = 'multipart/byteranges; boundary='.self::getBoundary();
// no Content-Length header here
// no Content-Length header here
} else {
\header(\sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true);
OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1);
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/owncloud-codestyle/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"owncloud/coding-standard": "^4.1"
"owncloud/coding-standard": "^4.2"
}
}

0 comments on commit ea7997e

Please sign in to comment.