Skip to content

Commit 4c6e85b

Browse files
committed
chore: Fix cs-fixer configuration and apply latest coding standard
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent f526f08 commit 4c6e85b

10 files changed

Lines changed: 27 additions & 10 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22

33
declare(strict_types=1);
4+
45
/**
56
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
67
* SPDX-License-Identifier: AGPL-3.0-or-later
78
*/
8-
require_once './vendor/autoload.php';
9+
10+
require_once './vendor-bin/cs-fixer/vendor/autoload.php';
911

1012
use Nextcloud\CodingStandard\Config;
1113

appinfo/routes.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: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later

lib/Controller/DataRequestController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -22,7 +23,7 @@ public function __construct(
2223
Request $dataRequest,
2324
string $corsMethods = 'PUT, POST, GET, DELETE, PATCH',
2425
string $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
25-
int $corsMaxAge = 1728000
26+
int $corsMaxAge = 1728000,
2627
) {
2728
parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge);
2829
$this->dataRequest = $dataRequest;

lib/Exceptions/HintedRuntime.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -11,7 +12,7 @@
1112
class HintedRuntime extends \RuntimeException {
1213
protected string $hint;
1314

14-
public function __construct(string $message = '', string $hint = '', int $code = 0, Throwable $previous = null) {
15+
public function __construct(string $message = '', string $hint = '', int $code = 0, ?Throwable $previous = null) {
1516
parent::__construct($message, $code, $previous);
1617
$this->hint = $hint;
1718
}

lib/Services/Request.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -35,7 +36,7 @@ public function __construct(
3536
IConfig $config,
3637
IUserSession $userSession,
3738
IL10N $l,
38-
Defaults $defaults
39+
Defaults $defaults,
3940
) {
4041
$this->groupManager = $groupManager;
4142
$this->mailer = $mailer;

lib/Settings/Personal.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: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later

tests/bootstrap.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -8,8 +9,8 @@
89
define('PHPUNIT_RUN', 1);
910
}
1011

11-
require_once __DIR__.'/../../../lib/base.php';
12-
require_once __DIR__.'/../vendor/autoload.php';
12+
require_once __DIR__ . '/../../../lib/base.php';
13+
require_once __DIR__ . '/../vendor/autoload.php';
1314

1415
\OC::$loader->addValidRoot(\OC::$SERVERROOT . '/tests');
1516
\OC_App::loadApp('data_request');

tests/unit/Controller/DataRequestControllerTest.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: 2018 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-License-Identifier: AGPL-3.0-or-later

vendor-bin/cs-fixer/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"require-dev": {
33
"nextcloud/coding-standard": "^1.3"
4+
},
5+
"config": {
6+
"platform": {
7+
"php": "8.1"
8+
}
49
}
510
}

vendor-bin/cs-fixer/composer.lock

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

0 commit comments

Comments
 (0)