Skip to content

Commit fdab784

Browse files
committed
manual: StyleCI changes
I'm not particularly fond of the aligned-assignment-operator styling, but "When in Rome". I'll look into adding a .idea config so that at least PHPStorm automatically does the right thing when formatting.
1 parent 62114be commit fdab784

File tree

12 files changed

+37
-39
lines changed

12 files changed

+37
-39
lines changed

app/src/Apikey/ApikeyController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function index($username): void
6666
$_SESSION['api_key_page'] = $page;
6767

6868
$apikeyApi = $this->getApikeyApi();
69-
$tokens = $apikeyApi->getCollection($queryParams);
69+
$tokens = $apikeyApi->getCollection($queryParams);
7070

7171
// reset session state if oauth_access_tokens are removed while user is logged in (found during testing)
7272
if (!isset($tokens['tokens'])) {

app/src/Application/BaseApiResult.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ public function get_body(): string
3131
{
3232
return $this->body;
3333
}
34-
35-
3634
}

app/src/Event/EventController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public function scheduleGrid(string $friendly_name, $starred = false): void
390390

391391
setcookie('schedule-view', 'grid', ['expires' => strtotime('+2 years'), 'path' => '/']);
392392

393-
$talkApi = $this->getTalkApi();
393+
$talkApi = $this->getTalkApi();
394394
$eventScheduler = new EventScheduler($talkApi);
395395

396396
$schedule = $eventScheduler->getScheduleData($event);
@@ -793,8 +793,8 @@ private function editEventHostUsingForm(EventEntity $eventEntity, $hostUsername)
793793

794794
protected function getEventApi(): \Event\EventApi
795795
{
796-
$cacheService = $this->getCache();
797-
$eventDb = new EventDb($cacheService);
796+
$cacheService = $this->getCache();
797+
$eventDb = new EventDb($cacheService);
798798

799799
return new EventApi($this->cfg, $this->accessToken, $eventDb, $this->getUserApi());
800800
}
@@ -841,8 +841,8 @@ public function xhrAttend(string $friendly_name): void
841841
{
842842
$this->application->response()->header('Content-Type', 'application/json');
843843

844-
$eventApi = $this->getEventApi();
845-
$event = $eventApi->getByFriendlyUrl($friendly_name);
844+
$eventApi = $this->getEventApi();
845+
$event = $eventApi->getByFriendlyUrl($friendly_name);
846846

847847
$result = null;
848848
if ($event) {
@@ -856,8 +856,8 @@ public function xhrUnattend(string $friendly_name): void
856856
{
857857
$this->application->response()->header('Content-Type', 'application/json');
858858

859-
$eventApi = $this->getEventApi();
860-
$event = $eventApi->getByFriendlyUrl($friendly_name);
859+
$eventApi = $this->getEventApi();
860+
$event = $eventApi->getByFriendlyUrl($friendly_name);
861861

862862
$result = null;
863863
if ($event) {

app/src/Event/EventFormType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ public static function getNestedListOfTimezones(): array
284284

285285
$result = [];
286286
foreach ($timezones as $timezone) {
287-
[$continent, $city] = explode('/', $timezone, 2);
288-
$result[$continent][] = $city;
287+
[$continent, $city] = explode('/', $timezone, 2);
288+
$result[$continent][] = $city;
289289
}
290290

291291
foreach ($result as $continent => $cities) {

app/src/Event/EventScheduler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function getEventDays($talks): array
5959
}
6060

6161
$talks = $talks['talks'];
62-
usort($talks, fn(TalkEntity $a, TalkEntity $b): int => $a->getStartDateTime() <=> $b->getStartDateTime() ?:
62+
usort($talks, fn (TalkEntity $a, TalkEntity $b): int => $a->getStartDateTime() <=> $b->getStartDateTime() ?:
6363
($a->getTracks() && $b->getTracks()
6464
? strcasecmp($a->getTracks()[0]->track_uri, $b->getTracks()[0]->track_uri)
6565
: $a['id'] <=> $b['id']));

app/src/Middleware/FormMiddleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function call(): void
8787
$csrfSecret = $formMiddleWare->csrfSecret;
8888
$this->app->container->singleton(
8989
self::SERVICE_FORM_FACTORY,
90-
fn(): FormFactoryInterface => $formMiddleWare->createFormFactory($csrfSecret)
90+
fn (): FormFactoryInterface => $formMiddleWare->createFormFactory($csrfSecret)
9191
);
9292

9393
$this->next->call();
@@ -140,7 +140,7 @@ private function getChainingLoader(Environment $twigEnvironment): ChainLoader
140140
private function addFormTemplatesFolderToLoader(ChainLoader $chainLoader): void
141141
{
142142
$reflectionClass = new ReflectionClass(FormExtension::class);
143-
$path = dirname($reflectionClass->getFileName()) . '/../Resources/views/Form';
143+
$path = dirname($reflectionClass->getFileName()) . '/../Resources/views/Form';
144144
$chainLoader->addLoader(new FilesystemLoader($path));
145145
}
146146

app/src/Middleware/ValidationMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function call(): void
5656
$middleware = $this;
5757
$this->app->container->singleton(
5858
self::SERVICE_VALIDATOR,
59-
fn() => $middleware->createValidator()
59+
fn () => $middleware->createValidator()
6060
);
6161

6262
$this->next->call();

app/src/Talk/TalkApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function getAgenda(string $talksUri): array
216216

217217
$agenda = [];
218218

219-
usort($talks, fn(TalkEntity $a, TalkEntity $b): int => $a->getStartDateTime() <=> $b->getStartDateTime() ?:
219+
usort($talks, fn (TalkEntity $a, TalkEntity $b): int => $a->getStartDateTime() <=> $b->getStartDateTime() ?:
220220
($a->getTracks() && $b->getTracks()
221221
? strcasecmp($a->getTracks()[0]->track_uri, $b->getTracks()[0]->track_uri)
222222
: $a['id'] <=> $b['id']));
@@ -512,7 +512,7 @@ protected function updateTalkMedia(string $talkId, string $mediaId, array $media
512512

513513
protected function deleteTalkMedia(string $talkId, string $mediaId): bool
514514
{
515-
$talkUrl = $this->baseApiUrl . '/v2.1/talks/' . $talkId . '/links/' . $mediaId;
515+
$talkUrl = $this->baseApiUrl . '/v2.1/talks/' . $talkId . '/links/' . $mediaId;
516516
[$status, $result, $headers] = $this->apiDelete($talkUrl);
517517

518518
if ($status == 204) {

app/src/Talk/TalkFormType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TalkFormType extends AbstractType
3636
public function __construct(EventEntity $eventEntity, array $languages, array $talkTypes, array $tracks)
3737
{
3838
$this->timezone = $eventEntity->getFullTimezone();
39-
$dateTimeZone = new \DateTimeZone($this->timezone);
39+
$dateTimeZone = new \DateTimeZone($this->timezone);
4040
$this->startDate = new \DateTimeImmutable($eventEntity->getStartDate(), $dateTimeZone);
4141
$this->endDate = new \DateTimeImmutable($eventEntity->getEndDate(), $dateTimeZone);
4242

app/src/User/UserController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ public function profile($username): void
276276

277277
$talkData = $talkDb->load('uri', $talkComment->getTalkUri());
278278
if ($talkData) {
279-
$eventUri = $talkData['event_uri'];
279+
$eventUri = $talkData['event_uri'];
280280
$talkInfo[$talkComment->getTalkUri()]['url_friendly_talk_title'] = $talkData['slug'];
281281
} else {
282282
$talk = $talkApi->getTalk($talkComment->getTalkUri());
283283
if ($talk) {
284-
$eventUri = $talk->getEventUri();
284+
$eventUri = $talk->getEventUri();
285285
$talkInfo[$talkComment->getTalkUri()]['url_friendly_talk_title'] = $talk->getUrlFriendlyTalkTitle();
286286
}
287287
}
@@ -448,12 +448,12 @@ public function profileComments($username): void
448448

449449
$talkData = $talkDb->load('uri', $talkComment->getTalkUri());
450450
if ($talkData) {
451-
$eventUri = $talkData['event_uri'];
451+
$eventUri = $talkData['event_uri'];
452452
$talkInfo[$talkComment->getTalkUri()]['url_friendly_talk_title'] = $talkData['slug'];
453453
} else {
454454
$talk = $talkApi->getTalk($talkComment->getTalkUri());
455455
if ($talk) {
456-
$eventUri = $talk->getEventUri();
456+
$eventUri = $talk->getEventUri();
457457
$talkInfo[$talkComment->getTalkUri()]['url_friendly_talk_title'] = $talk->getUrlFriendlyTalkTitle();
458458
}
459459
}

0 commit comments

Comments
 (0)