Skip to content

Commit 9e62ae3

Browse files
authored
Merge pull request #1438 from nextcloud/fix/master/coding-standard
fix(composer): update nextcloud/coding-standard to ^1.3
2 parents 1a49fc6 + 92f2134 commit 9e62ae3

File tree

18 files changed

+135
-80
lines changed

18 files changed

+135
-80
lines changed

appinfo/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-FileCopyrightText: 2015 ownCloud, Inc.
56
* SPDX-License-Identifier: AGPL-3.0-or-later
67
*/
7-
/** @var $this OC\Route\Router */
88
return ['routes' => [
99
// page
1010
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "project",
44
"license": "AGPLv3",
55
"require-dev": {
6-
"nextcloud/coding-standard": "v1.1.1",
6+
"nextcloud/coding-standard": "^1.3",
77
"nextcloud/ocp": "dev-master",
88
"phpunit/phpunit": "^9",
99
"vimeo/psalm": "^5.15"

composer.lock

Lines changed: 102 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Command/Tail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function configure() {
3434
$this
3535
->setName('log:tail')
3636
->setDescription('Tail the nextcloud logfile')
37-
->addArgument('lines', InputArgument::OPTIONAL, 'The number of log entries to print', "10")
37+
->addArgument('lines', InputArgument::OPTIONAL, 'The number of log entries to print', '10')
3838
->addOption('follow', 'f', InputOption::VALUE_NONE, 'Output new log entries as they appear')
3939
->addOption('raw', 'r', InputOption::VALUE_NONE, 'Output raw log json instead of formatted log item');
4040
parent::configure();

lib/Command/Watch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function watch(bool $raw, OutputInterface $output): int {
9393
$output->writeln(json_encode($line));
9494
} else {
9595
$this->printItem($line, $output, $messageWidth);
96-
$output->writeln("");
96+
$output->writeln('');
9797
}
9898
}
9999

lib/Controller/LogController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2016-2023 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-FileCopyrightText: 2015 ownCloud, Inc.
@@ -24,7 +25,8 @@
2425
*/
2526
class LogController extends Controller {
2627

27-
public function __construct($appName,
28+
public function __construct(
29+
$appName,
2830
IRequest $request,
2931
private LogIteratorFactory $logIteratorFactory,
3032
private SettingsService $settingsService,
@@ -129,7 +131,7 @@ protected function responseFromIterator(\Iterator $iterator, $count, $offset): J
129131
for ($i = 0; $i < $count && $iterator->valid(); $i++) {
130132
$line = $iterator->current();
131133
if (!is_null($line)) {
132-
$line["id"] = uniqid();
134+
$line['id'] = uniqid();
133135
$data[] = $line;
134136
}
135137
$iterator->next();

lib/Controller/PageController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-FileCopyrightText: 2015 ownCloud, Inc.

lib/Controller/SettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function updateAppConfig(string $settingsKey, $settingsValue): JSONRespon
6262
// Check type of value
6363
if (gettype($settingsValue) !== gettype($this->settingsService->getAppSettings()[$settingsKey])) {
6464
// Invalid type
65-
$this->logger->debug('Incorrect value type for appConfig key', ['settingsKey' => $settingsKey, "valueType" => gettype($settingsValue)]);
65+
$this->logger->debug('Incorrect value type for appConfig key', ['settingsKey' => $settingsKey, 'valueType' => gettype($settingsValue)]);
6666
return new JSONResponse([], Http::STATUS_BAD_REQUEST);
6767
}
6868

lib/Log/Console.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ private static function parseLogLevel(string $level): int {
5555
}
5656

5757
switch (strtoupper($level)) {
58-
case "DEBUG":
58+
case 'DEBUG':
5959
return 0;
60-
case "INFO":
60+
case 'INFO':
6161
return 1;
62-
case "WARN":
62+
case 'WARN':
6363
return 2;
64-
case "ERROR":
64+
case 'ERROR':
6565
return 3;
66-
case "FATAL":
66+
case 'FATAL':
6767
return 4;
6868
default:
6969
throw new \Exception("Unknown log level $level");

lib/Log/Formatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function formatTraceLine(int $index, array $trace, int $largestIndexWidt
6161
implode(",\n", array_map(function ($argumentLine) use ($argumentWhiteSpace) {
6262
return $argumentWhiteSpace . ' ' . trim($argumentLine);
6363
}, $arguments)) . "\n" .
64-
$argumentWhiteSpace . ")";
64+
$argumentWhiteSpace . ')';
6565
}
6666
}
6767

0 commit comments

Comments
 (0)