Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 94f7948

Browse files
Update classes to implement Arrayable and mark overridden methods
Multiple classes have been updated to implement the Arrayable interface. Additionally, public functions including 'toArray', 'upload', and 'remove' have been marked with the #[\Override] attribute to specify that these methods are overriding methods from a superclass or interface. Some minor changes to composer.json also included.
1 parent 0ef41f6 commit 94f7948

36 files changed

+100
-52
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
],
2020
"scripts": {
2121
"test": [
22-
"./vendor/bin/pest",
23-
"./vendor/bin/phpstan analyse -c phpstan.neon"
22+
"composer test:unit",
23+
"composer test:phpstan"
2424
],
2525
"test:unit": "./vendor/bin/pest",
2626
"test:coverage": "./vendor/bin/pest --coverage --coverage-clover coverage.xml",

src/Abstract/AbstractApplication.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public function restartApplication(): bool
406406
/**
407407
* @return array
408408
*/
409-
public function toArray(): array
409+
#[\Override] public function toArray(): array
410410
{
411411
return [
412412
'user' => $this->getUser(),
@@ -434,13 +434,13 @@ public function toJson(): string|false
434434
* @return void
435435
* @throws UnitException
436436
*/
437-
public function upload(UnitRequest $request): void
437+
#[\Override] public function upload(UnitRequest $request): void
438438
{
439439
$request->setMethod('PUT')
440440
->send($this->getApiEndpoint(), true, ['json' => array_filter($this->toArray(), fn ($item) => !empty($item))]);
441441
}
442442

443-
public function remove(UnitRequest $request): void
443+
#[\Override] public function remove(UnitRequest $request): void
444444
{
445445
$request->setMethod('DELETE')->send($this->getApiEndpoint());
446446
}

src/Abstract/AbstractExternalApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ final public function parseFromArray(array $data): void
104104
/**
105105
* @inheritDoc
106106
*/
107-
public function toArray(): array
107+
#[\Override] public function toArray(): array
108108
{
109109
return array_merge(
110110
parent::toArray(),

src/Abstract/IdmapAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function parseFromArray(array $data): void
105105
/**
106106
* @return array
107107
*/
108-
public function toArray(): array
108+
#[\Override] public function toArray(): array
109109
{
110110
return [
111111
'container' => $this->getContainer(),

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ public function removeAccessLog(): bool
575575
*
576576
* @return array
577577
*/
578-
public function toArray(): array
578+
#[\Override] public function toArray(): array
579579
{
580580
$array = [];
581581

src/Config/Application/JavaApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ final public function parseFromArray(array $data): void
139139
}
140140
}
141141

142-
public function toArray(): array
142+
#[\Override] public function toArray(): array
143143
{
144144
return array_merge(
145145
parent::toArray(),

src/Config/Application/Options/PhpOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function setFile(string $file): self
8888
/**
8989
* @return array
9090
*/
91-
public function toArray(): array
91+
#[\Override] public function toArray(): array
9292
{
9393
return [
9494
'admin' => $this->getAdmin(),

src/Config/Application/PerlApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ final public function parseFromArray(array $data): void
8484
/**
8585
* @inheritDoc
8686
*/
87-
public function toArray(): array
87+
#[\Override] public function toArray(): array
8888
{
8989
return array_merge(
9090
parent::toArray(),

src/Config/Application/PhpApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ final public function parseFromArray(array $data): void
193193
/**
194194
* @inheritDoc
195195
*/
196-
public function toArray(): array
196+
#[\Override] public function toArray(): array
197197
{
198198
return array_merge(
199199
parent::toArray(),

src/Config/Application/ProcessManagement/ApplicationProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(array $data = [])
4848
/**
4949
* @return array
5050
*/
51-
public function toArray(): array
51+
#[\Override] public function toArray(): array
5252
{
5353
$result = [];
5454

0 commit comments

Comments
 (0)