Skip to content

Commit

Permalink
chore: composer run cs:fix
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
MCMic committed Jan 4, 2025
1 parent 226ab86 commit 5f98c34
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/Activity/Settings/KitineraryImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function getName(): string {

/**
* @return int whether the filter should be rather on the top or bottom of
* the admin section. The filters are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.
* the admin section. The filters are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.
* @since 11.0.0
*/
public function getPriority(): int {
Expand Down
10 changes: 5 additions & 5 deletions lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatch

try {
$adapter = $this->findAvailableAdapter();
$this->logger->debug('Using adapter '.$adapter::class);
$this->logger->debug('Using adapter ' . $adapter::class);

$itinerary = $adapter->extractIcalFromString($node->getContent());
} catch (\Exception $e) {
Expand Down Expand Up @@ -191,7 +191,7 @@ private function insertIcalEvent(string $userUri, string $calendarUri, File $fil
/** @var iterable<VEvent> $events */
$events = $vEvent->getIterator();
} else {
throw new \Exception('No events found in file '.$file->getPath());
throw new \Exception('No events found in file ' . $file->getPath());
}

foreach ($events as $event) {
Expand All @@ -214,7 +214,7 @@ private static function computePrincipalUri(string $userId): string {
}

private static function getUserIdFromPrincipalUri(string $userUri): string {
return explode('/', $userUri, 3)[2] ?? throw new \InvalidArgumentException('Incorrect format for principal URI: '.$userUri);
return explode('/', $userUri, 3)[2] ?? throw new \InvalidArgumentException('Incorrect format for principal URI: ' . $userUri);
}

private function extractTypeFromEvent(VEvent $vEvent): string {
Expand Down Expand Up @@ -255,7 +255,7 @@ private function successNotification(string $userUri, string $calendarUri, strin
],
]
)
->setObject('import', sha1($file->getName().$eventId));
->setObject('import', sha1($file->getName() . $eventId));
$this->notificationManager->notify($notification);
}

Expand Down Expand Up @@ -285,7 +285,7 @@ private function failureNotification(string $userUri, string $calendarUri, File
],
]
)
->setObject('import', sha1($file->getName().$userUri.$calendarUri));
->setObject('import', sha1($file->getName() . $userUri . $calendarUri));
$this->notificationManager->notify($notification);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/OperationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ protected function setUp(): void {

public function testValidateOperation(): void {
$this->calendarManager->expects(self::once())->method('getCalendarsForPrincipal');
$this->operation->validateOperation('name', [], json_encode(["principals/users/fakeuser","uri"]));
$this->operation->validateOperation('name', [], json_encode(['principals/users/fakeuser','uri']));
}

public static function dataOnEvent(): array {
return [
[
'/fakeuser/files/path/to/file.pdf',
file_get_contents(__DIR__.'/documents/iata-bcbp-demo.pdf'),
file_get_contents(__DIR__.'/documents/iata-bcbp-demo.ics'),
file_get_contents(__DIR__ . '/documents/iata-bcbp-demo.pdf'),
file_get_contents(__DIR__ . '/documents/iata-bcbp-demo.ics'),
],
];
}
Expand All @@ -119,7 +119,7 @@ public function testOnEvent(string $path, string $content, string $icalContent):

$ruleMatcher = $this->createMock(IRuleMatcher::class);
$ruleMatcher->expects(self::once())->method('getFlows')
->willReturn([['operation' => json_encode(["principals/users/fakeuser","uri"])]]);
->willReturn([['operation' => json_encode(['principals/users/fakeuser','uri'])]]);

$node = $this->createMock(File::class);
$node->expects(self::atLeastOnce())->method('getId')
Expand Down

0 comments on commit 5f98c34

Please sign in to comment.