Skip to content

Commit

Permalink
Merge pull request #12570 from nextcloud/dependabot/composer/vendor-b…
Browse files Browse the repository at this point in the history
…in/csfixer/nextcloud/coding-standard-1.2.1

chore(deps-dev): Bump nextcloud/coding-standard from 1.1.0 to 1.2.1 in /vendor-bin/csfixer
  • Loading branch information
nickvergessen authored Jun 24, 2024
2 parents 03a3e63 + 59cbdec commit 378c59f
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 2,564 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
require_once './vendor-bin/csfixer/vendor/autoload.php';

use Nextcloud\CodingStandard\Config;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$config = new Config();
$config
->setParallelConfig(ParallelConfigFactory::detect())
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
Expand Down
92 changes: 46 additions & 46 deletions tests/integration/features/bootstrap/FeatureContext.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/integration/features/bootstrap/RecordingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private function sendBackendRequestFromRecordingServer(array $data, int $statusC
/**
* @Then /^(recording|signaling) server received the following requests$/
*/
public function fakeServerReceivedTheFollowingRequests(string $server, TableNode $formData = null) {
public function fakeServerReceivedTheFollowingRequests(string $server, ?TableNode $formData = null) {
if ($server === 'recording') {
$requests = $this->getRecordingServerReceivedRequests();
} else {
Expand Down
28 changes: 14 additions & 14 deletions tests/integration/features/bootstrap/SharingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function userDeletesFile($user, $file) {
* @param string $sharee
* @param TableNode|null $body
*/
public function userSharesWithUser(string $user, string $path, string $sharee, TableNode $body = null) {
public function userSharesWithUser(string $user, string $path, string $sharee, ?TableNode $body = null) {
$this->userSharesWith($user, $path, 0 /*IShare::TYPE_USER*/, $sharee, $body);
}

Expand All @@ -127,7 +127,7 @@ public function userSharesWithUserWithOcs(string $user, string $path, string $sh
* @param string $sharee
* @param TableNode|null $body
*/
public function userSharesWithGroup(string $user, string $path, string $sharee, TableNode $body = null) {
public function userSharesWithGroup(string $user, string $path, string $sharee, ?TableNode $body = null) {
$this->userSharesWith($user, $path, 1 /*IShare::TYPE_GROUP*/, $sharee, $body);
}

Expand All @@ -152,7 +152,7 @@ public function userSharesWithGroupWithOcs(string $user, string $path, string $s
* @param string $sharee
* @param TableNode|null $body
*/
public function userSharesWithTeam(string $user, string $path, string $sharee, TableNode $body = null) {
public function userSharesWithTeam(string $user, string $path, string $sharee, ?TableNode $body = null) {
$this->userSharesWith($user, $path, 7 /*IShare::TYPE_CIRCLE*/, $sharee, $body);
}

Expand All @@ -177,7 +177,7 @@ public function userSharesWithTeamWithOcs(string $user, string $path, string $sh
* @param string $room
* @param TableNode|null $body
*/
public function userSharesWithRoom(string $user, string $path, string $room, TableNode $body = null) {
public function userSharesWithRoom(string $user, string $path, string $room, ?TableNode $body = null) {
$this->userSharesWith($user, $path, 10 /*IShare::TYPE_ROOM*/, FeatureContext::getTokenForIdentifier($room), $body);
}

Expand All @@ -201,7 +201,7 @@ public function userSharesWithRoomWithOcs(string $user, string $path, string $ro
* @param string $path
* @param TableNode|null $body
*/
public function userSharesByLink(string $user, string $path, TableNode $body = null) {
public function userSharesByLink(string $user, string $path, ?TableNode $body = null) {
$this->userSharesWith($user, $path, 3 /*IShare::TYPE_LINK*/, '', $body);
}

Expand All @@ -213,7 +213,7 @@ public function userSharesByLink(string $user, string $path, TableNode $body = n
* @param int $statusCode
* @param TableNode|null $body
*/
public function userSharesByLinkWithOcs(string $user, string $path, int $statusCode, TableNode $body = null) {
public function userSharesByLinkWithOcs(string $user, string $path, int $statusCode, ?TableNode $body = null) {
$this->userSharesByLink($user, $path, $body);
$this->theOCSStatusCodeShouldBe($statusCode);
}
Expand Down Expand Up @@ -477,7 +477,7 @@ public function userGetsTheShareTypeDavPropertyFor(string $user, string $path) {
public function userGetsRecentFiles(string $user) {
// Recents endpoint is not an OCS endpoint, so a request token must be
// provided.
list($requestToken, $cookieJar) = $this->loggingInUsingWebAs($user);
[$requestToken, $cookieJar] = $this->loggingInUsingWebAs($user);

$url = '/index.php/apps/files/api/v1/recent';

Expand Down Expand Up @@ -658,7 +658,7 @@ public function shareXIsReturnedWith(int $number, TableNode $body) {
* @param string $isEmpty
* @param TableNode|null $shareesList
*/
public function shareesReturnedAreIsEmpty(string $shareeType, string $isEmpty, TableNode $shareesList = null) {
public function shareesReturnedAreIsEmpty(string $shareeType, string $isEmpty, ?TableNode $shareesList = null) {
if ($isEmpty !== 'is empty') {
$sharees = [];
foreach ($shareesList->getRows() as $row) {
Expand Down Expand Up @@ -687,7 +687,7 @@ public function shareesReturnedAreIsEmpty(string $shareeType, string $isEmpty, T
* @param string $user
* @param TableNode|null $table
*/
public function theListOfReturnedFilesForIs(string $user, TableNode $table = null) {
public function theListOfReturnedFilesForIs(string $user, ?TableNode $table = null) {
$xmlResponse = $this->getXmlResponse();
$xmlResponse->registerXPathNamespace('d', 'DAV:');

Expand All @@ -711,7 +711,7 @@ public function theListOfReturnedFilesForIs(string $user, TableNode $table = nul
*
* @param TableNode|null $table
*/
public function theResponseContainsAShareTypesDavPropertyWith(TableNode $table = null) {
public function theResponseContainsAShareTypesDavPropertyWith(?TableNode $table = null) {
$xmlResponse = $this->getXmlResponse();
$xmlResponse->registerXPathNamespace('oc', 'http://owncloud.org/ns');

Expand All @@ -736,7 +736,7 @@ public function theResponseContainsAShareTypesDavPropertyWith(TableNode $table =
* @param string $path
* @param TableNode|null $table
*/
public function theResponseContainsAShareTypesFilesPropertyForWith(string $path, TableNode $table = null) {
public function theResponseContainsAShareTypesFilesPropertyForWith(string $path, ?TableNode $table = null) {
$response = json_decode($this->response->getBody());

$fileForPath = array_filter($response->files, function ($file) use ($path) {
Expand Down Expand Up @@ -774,7 +774,7 @@ public function theResponseContainsAShareTypesFilesPropertyForWith(string $path,
* @param string $shareWith
* @param TableNode|null $body
*/
private function userSharesWith(string $user, string $path, string $shareType, string $shareWith, TableNode $body = null) {
private function userSharesWith(string $user, string $path, string $shareType, string $shareWith, ?TableNode $body = null) {
$this->currentUser = $user;

$url = '/apps/files_sharing/api/v1/shares';
Expand Down Expand Up @@ -818,7 +818,7 @@ private function userSharesWith(string $user, string $path, string $shareType, s
* @param string $url
* @param TableNode $body
*/
private function sendingTo(string $verb, string $url, TableNode $body = null) {
private function sendingTo(string $verb, string $url, ?TableNode $body = null) {
$fullUrl = $this->baseUrl . "ocs/v1.php" . $url;
$client = new Client();
$options = [];
Expand Down Expand Up @@ -851,7 +851,7 @@ private function sendingTo(string $verb, string $url, TableNode $body = null) {
* @param array $headers
* @param string $body
*/
private function sendingToDav(string $verb, string $url, array $headers = null, string $body = null) {
private function sendingToDav(string $verb, string $url, ?array $headers = null, ?string $body = null) {
$fullUrl = $this->baseUrl . "remote.php/dav/files" . $url;
$client = new Client();
$options = [];
Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/oc_comments_comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
namespace OC\Comments {
class Comment implements \OCP\Comments\IComment {
public function __construct(array $data = null) {
public function __construct(?array $data = null) {
}
public function setMessage($message, $maxLength = self::MAX_MESSAGE_LENGTH) {
}
Expand Down
4 changes: 2 additions & 2 deletions tests/stubs/oc_comments_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getTree($id, $limit = 0, $offset = 0) {
// TODO: Implement getTree() method.
}

public function getForObject($objectType, $objectId, $limit = 0, $offset = 0, \DateTime $notOlderThan = null) {
public function getForObject($objectType, $objectId, $limit = 0, $offset = 0, ?\DateTime $notOlderThan = null) {
// TODO: Implement getForObject() method.
}

Expand All @@ -47,7 +47,7 @@ public function searchForObjects(string $search, string $objectType, array $obje
// TODO: Implement searchForObjects() method.
}

public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') {
public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '') {
// TODO: Implement getNumberOfCommentsForObject() method.
}

Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/oc_core_command_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Base {

protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;

public function __construct(string $name = null) {
public function __construct(?string $name = null) {
}

protected function configure() {
Expand Down
Loading

0 comments on commit 378c59f

Please sign in to comment.