Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Update nextcloud/coding-standard
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Mar 5, 2025
commit 72d37a120338e9e4598213cbca6e47ee9ef23fbd
6 changes: 4 additions & 2 deletions lib/Command/SendEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ class SendEmails extends Base {
* @param IConfig $config
* @param LoggerInterface $logger
*/
public function __construct(protected MailQueueHandler $queueHandler,
public function __construct(
protected MailQueueHandler $queueHandler,
protected IConfig $config,
protected LoggerInterface $logger) {
protected LoggerInterface $logger,
) {
parent::__construct();

$this->queueHandler = $queueHandler;
Expand Down
3 changes: 2 additions & 1 deletion lib/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public function __construct(
protected Data $data,
protected IManager $manager,
protected UserSettings $userSettings,
protected NotificationGenerator $notificationGenerator) {
protected NotificationGenerator $notificationGenerator,
) {
}

/**
Expand Down
3 changes: 2 additions & 1 deletion lib/Controller/APIv1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class APIv1Controller extends OCSController {
* @param UserSettings $userSettings
* @param CurrentUser $currentUser
*/
public function __construct($appName,
public function __construct(
$appName,
IRequest $request,
protected Data $data,
protected GroupHelper $groupHelper,
Expand Down
3 changes: 2 additions & 1 deletion lib/Controller/APIv2Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class APIv2Controller extends OCSController {
/** @var bool */
protected $loadPreviews;

public function __construct($appName,
public function __construct(
$appName,
IRequest $request,
protected IManager $activityManager,
protected Data $data,
Expand Down
8 changes: 5 additions & 3 deletions lib/Controller/RemoteActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
use OCP\IUserManager;

class RemoteActivityController extends OCSController {
public function __construct($appName,
public function __construct(
$appName,
IRequest $request,
protected IDBConnection $db,
protected IUserManager $userManager,
protected IAppManager $appManager,
protected IRootFolder $rootFolder,
protected IActivityManager $activityManager) {
protected IActivityManager $activityManager,
) {
parent::__construct($appName, $request);
}

Expand Down Expand Up @@ -164,7 +166,7 @@ public function receiveActivity($token, array $to, array $actor, $type, $updated
/**
* @param null|string $path2
*/
protected function getSubject(string $type, string $path, string|null $path2) {
protected function getSubject(string $type, string $path, ?string $path2) {
switch ($type) {
case 'Create':
return 'created_by';
Expand Down
5 changes: 3 additions & 2 deletions lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function __construct(
protected IManager $manager,
protected UserSettings $userSettings,
protected IL10N $l10n,
CurrentUser $currentUser) {
CurrentUser $currentUser,
) {
parent::__construct($appName, $request);
$this->user = (string)$currentUser->getUID();
}
Expand All @@ -48,7 +49,7 @@ public function personal(
$notify_setting_batchtime = UserSettings::EMAIL_SEND_HOURLY,
$notify_setting_self = false,
$notify_setting_selfemail = false,
$activity_digest = false
$activity_digest = false,
) {
$settings = $this->manager->getSettings();
foreach ($settings as $setting) {
Expand Down
3 changes: 2 additions & 1 deletion lib/CurrentUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class CurrentUser {
public function __construct(
protected IUserSession $userSession,
protected IRequest $request,
protected IManager $shareManager) {
protected IManager $shareManager,
) {
$this->cloudId = false;
$this->sessionUser = false;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class Data {
public function __construct(
protected IManager $activityManager,
protected IDBConnection $connection,
protected LoggerInterface $logger) {
protected LoggerInterface $logger,
) {
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/DigestSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
private Defaults $defaults,
private IFactory $l10nFactory,
private IDateTimeFormatter $dateTimeFormatter,
private LoggerInterface $logger
private LoggerInterface $logger,
) {
}

Expand Down
4 changes: 3 additions & 1 deletion lib/Event/LoadAdditionalScriptsEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class LoadAdditionalScriptsEvent extends Event {
*/
public const EVENT_ENTITY = 'OCA\Activity::loadAdditionalScripts';

public function __construct(public string $filter) {
public function __construct(
public string $filter,
) {
parent::__construct();
}
}
2 changes: 1 addition & 1 deletion lib/GroupHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
protected IL10N $l,
protected IManager $activityManager,
protected IValidator $richObjectValidator,
protected LoggerInterface $logger
protected LoggerInterface $logger,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Settings/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(
UserSettings $userSettings,
IL10N $l10n,
CurrentUser $currentUser,
IInitialState $initialState
IInitialState $initialState,
) {
$this->config = $config;
$this->manager = $manager;
Expand Down
5 changes: 4 additions & 1 deletion lib/UserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class UserSettings {
* @param IManager $manager
* @param IConfig $config
*/
public function __construct(protected IManager $manager, protected IConfig $config) {
public function __construct(
protected IManager $manager,
protected IConfig $config,
) {
}

/**
Expand Down
4 changes: 3 additions & 1 deletion lib/ViewInfoCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class ViewInfoCache {
protected $cacheId;


public function __construct(protected IRootFolder $rootFolder) {
public function __construct(
protected IRootFolder $rootFolder,
) {
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/MailQueueHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ protected function assertRemainingMailEntries(array $users, int $maxTime, string
[$data,] = self::invokePrivate($this->mailQueueHandler, 'getItemsForUser', [$user, $maxTime]);
$this->assertNotEmpty(
$data,
'Failed asserting that the remaining user ' . $user. ' still has mails in the queue ' . $explain
'Failed asserting that the remaining user ' . $user . ' still has mails in the queue ' . $explain
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
define('PHPUNIT_RUN', 1);
}

require_once __DIR__.'/../../../lib/base.php';
require_once __DIR__ . '/../../../lib/base.php';

// Fix for "Autoload path not allowed: .../tests/lib/testcase.php"
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
Expand Down
3 changes: 2 additions & 1 deletion vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"sort-packages": true,
"require-dev": {
"nextcloud/coding-standard": "^1.2"
"nextcloud/coding-standard": "^1.3",
"friendsofphp/php-cs-fixer": "*"
}
}
67 changes: 57 additions & 10 deletions vendor-bin/cs-fixer/composer.lock

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