Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump nextcloud/coding-standard from 1.2.3 to ^1.3.1 (main) #6367

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@

# Update to coding-standard 1.2.3
3b3935b4e754ccbc00d3abb71ab6836f3db5b026

# Update to coding-standard 1.3.1
db4964b631856f514bc08d3da0e86014a18d678f
2 changes: 1 addition & 1 deletion lib/Controller/AppointmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(IRequest $request,
IUserManager $userManager,
AppointmentConfigService $configService,
IInitialState $initialState,
?string $userId
?string $userId,
) {
parent::__construct(Application::APP_ID, $request);

Expand Down
3 changes: 2 additions & 1 deletion lib/Listener/CalendarReferenceListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
*/
class CalendarReferenceListener implements IEventListener {
public function __construct(
private CalendarInitialStateService $calendarinitialStateService) {
private CalendarInitialStateService $calendarinitialStateService,
) {
$this->calendarinitialStateService = $calendarinitialStateService;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Reference/ReferenceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private function getUrlFromLink(string $data, string $type): ?string {
if ($type === 'public') {
return "{$this->urlGenerator->getWebroot()}/remote.php/dav/public-calendars/{$data}/";
} elseif ($type === 'private' && preg_match('/\/remote.php\/dav\/calendars\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\//', $data, $output_array)) {
return $this->urlGenerator->getWebroot().$output_array[0];
return $this->urlGenerator->getWebroot() . $output_array[0];
}
return null;

Expand Down
5 changes: 4 additions & 1 deletion lib/Service/Appointments/AvailabilityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class AvailabilityGenerator {
/** @var ITimeFactory */
private $timeFactory;

public function __construct(ITimeFactory $timeFactory, private LoggerInterface $logger) {
public function __construct(
ITimeFactory $timeFactory,
private LoggerInterface $logger,
) {
$this->timeFactory = $timeFactory;
}

Expand Down
18 changes: 10 additions & 8 deletions lib/Service/Appointments/BookingCalendarWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ class BookingCalendarWriter {

private TimezoneGenerator $timezoneGenerator;

public function __construct(IConfig $config,
public function __construct(
IConfig $config,
IManager $manager,
IUserManager $userManager,
ISecureRandom $random,
TimezoneGenerator $timezoneGenerator,
private IFactory $l10nFactory) {
private IFactory $l10nFactory,
) {
$this->config = $config;
$this->manager = $manager;
$this->userManager = $userManager;
Expand Down Expand Up @@ -107,7 +109,7 @@ public function write(AppointmentConfig $config,

$end = $start->getTimestamp() + $config->getLength();
$tz = $this->timezoneGenerator->generateVTimezone($timezone, $start->getTimestamp(), $end);
if($tz) {
if ($tz) {
$vcalendar->add($tz);
}

Expand Down Expand Up @@ -172,7 +174,7 @@ public function write(AppointmentConfig $config,
try {
$calendar->createFromString($filename . '.ics', $vcalendar->serialize());
} catch (CalendarException $e) {
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId(). ' to calendar: ' . $e->getMessage(), 0, $e);
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId() . ' to calendar: ' . $e->getMessage(), 0, $e);
}

if ($config->getPreparationDuration() !== 0) {
Expand All @@ -189,7 +191,7 @@ public function write(AppointmentConfig $config,
]
]);
$tz = $this->timezoneGenerator->generateVTimezone($timezone, $prepStart->getTimestamp(), $start->getTimestamp());
if($tz) {
if ($tz) {
$prepCalendar->add($tz);
}

Expand All @@ -202,7 +204,7 @@ public function write(AppointmentConfig $config,
try {
$calendar->createFromString($prepFileName . '.ics', $prepCalendar->serialize());
} catch (CalendarException $e) {
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId(). ' to calendar: ' . $e->getMessage(), 0, $e);
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId() . ' to calendar: ' . $e->getMessage(), 0, $e);
}
}

Expand All @@ -222,7 +224,7 @@ public function write(AppointmentConfig $config,
]);

$tz = $this->timezoneGenerator->generateVTimezone($timezone, $followupStart->getTimestamp(), $followUpEnd->getTimestamp());
if($tz) {
if ($tz) {
$followUpCalendar->add($tz);
}

Expand All @@ -235,7 +237,7 @@ public function write(AppointmentConfig $config,
try {
$calendar->createFromString($followUpFilename . '.ics', $followUpCalendar->serialize());
} catch (CalendarException $e) {
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId(). ' to calendar: ' . $e->getMessage(), 0, $e);
throw new RuntimeException('Could not write event for appointment config id ' . $config->getId() . ' to calendar: ' . $e->getMessage(), 0, $e);
}
}
return $vcalendar->serialize();
Expand Down
7 changes: 5 additions & 2 deletions lib/Service/Appointments/DailyLimitFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class DailyLimitFilter {
/** @var IManager */
private $calendarManger;

public function __construct(IManager $calendarManger, private LoggerInterface $logger) {
public function __construct(
IManager $calendarManger,
private LoggerInterface $logger,
) {
$this->calendarManger = $calendarManger;
}

Expand All @@ -33,7 +36,7 @@ public function __construct(IManager $calendarManger, private LoggerInterface $l
*/
public function filter(AppointmentConfig $config, array $slots): array {
$this->logger->debug('Slots before daily limit filtering:' . count($slots), ['app' => 'calendar-appointments']);
if(empty($slots)) {
if (empty($slots)) {
return [];
}
// 0. If there is no limit then we don't have to filter anything
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Appointments/EventConflictFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(IManager $calendarManager,
*/
public function filter(AppointmentConfig $config, array $slots): array {
$this->logger->debug('Slots before event conflict filtering:' . count($slots), ['app' => 'calendar-appointments']);
if(empty($slots)) {
if (empty($slots)) {
return [];
}
$query = $this->calendarManager->newQuery($config->getPrincipalUri());
Expand Down
6 changes: 4 additions & 2 deletions lib/Service/Appointments/MailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class MailService {

private IManager $notificationManager;

public function __construct(IMailer $mailer,
public function __construct(
IMailer $mailer,
IUserManager $userManager,
IL10N $l10n,
Defaults $defaults,
Expand All @@ -55,7 +56,8 @@ public function __construct(IMailer $mailer,
IDateTimeFormatter $dateFormatter,
IFactory $lFactory,
IManager $notificationManager,
private IConfig $userConfig) {
private IConfig $userConfig,
) {
$this->userManager = $userManager;
$this->mailer = $mailer;
$this->l10n = $l10n;
Expand Down
6 changes: 4 additions & 2 deletions lib/Service/Appointments/SlotExtrapolator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

class SlotExtrapolator {

public function __construct(private LoggerInterface $logger) {
public function __construct(
private LoggerInterface $logger,
) {

}
/**
Expand All @@ -24,7 +26,7 @@ public function __construct(private LoggerInterface $logger) {
public function extrapolate(AppointmentConfig $config,
array $availabilityIntervals): array {
$this->logger->debug('Intervals before extrapolating:' . count($availabilityIntervals), ['app' => 'calendar-appointments']);
if(empty($availabilityIntervals)) {
if (empty($availabilityIntervals)) {
return [];
}
foreach ($availabilityIntervals as $availabilityInterval) {
Expand Down
2 changes: 1 addition & 1 deletion tests/php/unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
define('PHPUNIT_RUN', 1);
}

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

\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);

Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"sort-packages": true
},
"require-dev": {
"nextcloud/coding-standard": "^1.2.3"
"nextcloud/coding-standard": "^1.3.1"
}
}
73 changes: 60 additions & 13 deletions vendor-bin/cs-fixer/composer.lock

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

Loading