Skip to content

Commit 018af27

Browse files
committed
Fix indentations and spaces
1 parent 1cc0452 commit 018af27

19 files changed

Lines changed: 131 additions & 129 deletions

File tree

application/controllers/SourcesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function indexAction(): void
3939
$this->getTabs()->activate('sources');
4040

4141
$sources = Source::on(Database::get())
42-
->columns(['id', 'type', 'name']);
42+
->columns(['id', 'type', 'name']);
4343

4444
$limitControl = $this->createLimitControl();
4545
$paginationControl = $this->createPaginationControl($sources);

application/forms/ContactGroupForm.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ protected function assemble(): void
6565
->on(TermInput::ON_SAVE, $callValidation)
6666
->on(TermInput::ON_PASTE, $callValidation);
6767

68-
// TODO: TermInput is not compatible with the new decorators yet: https://github.com/Icinga/ipl-web/pull/317
69-
$legacyDecorator = new IcingaFormDecorator();
70-
$termInput->setDefaultElementDecorator($legacyDecorator);
71-
$legacyDecorator->decorate($termInput);
68+
// TODO: TermInput is not compatible with the new decorators yet: https://github.com/Icinga/ipl-web/pull/317
69+
$legacyDecorator = new IcingaFormDecorator();
70+
$termInput->setDefaultElementDecorator($legacyDecorator);
71+
$legacyDecorator->decorate($termInput);
7272

7373
$this->addElement(
7474
'text',
@@ -363,9 +363,9 @@ public function removeContactgroup(): void
363363

364364
$escalationIds = $this->db->fetchCol(
365365
RuleEscalationRecipient::on($this->db)
366-
->columns('rule_escalation_id')
367-
->filter(Filter::equal('contactgroup_id', $this->contactgroupId))
368-
->assembleSelect()
366+
->columns('rule_escalation_id')
367+
->filter(Filter::equal('contactgroup_id', $this->contactgroupId))
368+
->assembleSelect()
369369
);
370370

371371
$this->db->update('rule_escalation_recipient', $markAsDeleted, $updateCondition);

library/Notifications/Api/EndpointInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
interface EndpointInterface
88
{
99
public function getEndpoint(): string;
10+
1011
public function getAllowedMethods(): array;
1112
}

library/Notifications/Api/Middleware/ErrorHandlingMiddleware.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
3636
return new Response(
3737
400,
3838
['Content-Type' => 'application/json'],
39-
Json::sanitize([
40-
'message' => $e->getMessage()
41-
])
39+
Json::sanitize(['message' => $e->getMessage()])
4240
);
4341
} catch (Throwable $e) {
4442
Logger::error($e);

library/Notifications/Api/OpenApiDescriptionElement/Parameter/PathParameter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ public function __construct(
2121
?string $example = null,
2222
) {
2323
$schema = $identifierSchema !== null
24-
? new OA\Schema(ref: '#/components/schemas/' . $identifierSchema)
25-
: ($schema !== null ? $schema : new OA\Schema(type: 'string'));
24+
? new OA\Schema(ref: '#/components/schemas/' . $identifierSchema)
25+
: ($schema !== null ? $schema : new OA\Schema(type: 'string'));
2626

2727
$params = [
2828
'parameter' => $parameter ?? Generator::UNDEFINED,
29-
'name' => $name ?? Generator::UNDEFINED,
30-
'description' => $description ?? Generator::UNDEFINED,
31-
'in' => 'path',
32-
'required' => $required ?? true,
33-
'schema' => $schema,
29+
'name' => $name ?? Generator::UNDEFINED,
30+
'description' => $description ?? Generator::UNDEFINED,
31+
'in' => 'path',
32+
'required' => $required ?? true,
33+
'schema' => $schema,
3434
];
3535

3636
$params = $example !== null ? array_merge($params, ['example' => $example]) : $params;

library/Notifications/Api/OpenApiDescriptionElement/Parameter/QueryParameter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function __construct(
3232
'schema' => $schema,
3333
];
3434

35-
$params = $example !== null ? array_merge($params, ['example' => $example]) : $params;
35+
$params = $example !== null ? array_merge($params, ['example' => $example]) : $params;
3636

37-
parent::__construct(...$params);
37+
parent::__construct(...$params);
3838
}
3939
}

library/Notifications/Api/OpenApiDescriptionElement/Response/ErrorResponse.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
],
2121
type: 'object',
2222
)]
23-
2423
class ErrorResponse extends Response
2524
{
2625
public const ERROR_RESPONSES = [

library/Notifications/Api/V1/ApiV1.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function handleRequest(ServerRequestInterface $request): ResponseInterfac
9292
* Override this method to modify the row before it is returned in the response.
9393
*
9494
* @param stdClass $row
95+
*
9596
* @return void
9697
*/
9798
public function prepareRow(stdClass $row): void

library/Notifications/Api/V1/ContactGroups.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ private function assertUniqueName(string $name, int $contactgroupId = null): voi
786786
* Fetch the values from the database
787787
*
788788
* @param int $contactgroupId
789+
*
789790
* @return array
790791
*
791792
* @throws HttpNotFoundException

library/Notifications/Api/V1/Contacts.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ public function delete(string $identifier): ResponseInterface
509509

510510
public function prepareRow(stdClass $row): void
511511
{
512-
$row->groups = ContactGroups::fetchGroupIdentifiers($row->contact_id);
513-
$row->addresses = self::fetchContactAddresses($row->contact_id) ?: new stdClass();
512+
$row->groups = ContactGroups::fetchGroupIdentifiers($row->contact_id);
513+
$row->addresses = self::fetchContactAddresses($row->contact_id) ?: new stdClass();
514514

515-
unset($row->contact_id);
515+
unset($row->contact_id);
516516
}
517517

518518
/**
@@ -576,6 +576,7 @@ public static function getContactId(string $identifier): ?int
576576
* @param string[] $groups
577577
*
578578
* @return void
579+
*
579580
* @throws HttpException
580581
*/
581582
private function addGroups(int $contactId, array $groups): void
@@ -624,6 +625,7 @@ private function addAddresses(int $contactId, array $addresses): void
624625
* @param requestBody $requestBody
625626
*
626627
* @return void
628+
*
627629
* @throws HttpException
628630
*/
629631
private function addContact(array $requestBody): void
@@ -999,6 +1001,7 @@ public static function fetchUserIdentifiers(int $contactgroupId): array
9991001
* Fetch the values from the database
10001002
*
10011003
* @param int $contactId
1004+
*
10021005
* @return array
10031006
*
10041007
* @throws HttpNotFoundException

0 commit comments

Comments
 (0)