Skip to content

Commit a62e4de

Browse files
committed
chore(psalm): Update to psalm 6
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 61155c6 commit a62e4de

35 files changed

Lines changed: 189 additions & 2066 deletions

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"test:unit": "phpunit -c tests/phpunit.xml tests/Unit",
2525
"test:unit:dev": "phpunit -c tests/phpunit.xml tests/Unit --no-coverage",
2626
"post-install-cmd": ["@composer bin all install --ansi"],
27-
"psalm": "psalm --threads=1",
28-
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
29-
"psalm:update-baseline:force": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
30-
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache"
27+
"psalm": "psalm.phar --threads=1",
28+
"psalm:fix": "psalm.phar --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType,MissingOverrideAttribute",
29+
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline",
30+
"psalm:update-baseline:force": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
31+
"psalm:clear": "psalm.phar --clear-cache && psalm --clear-global-cache"
3132
},
3233
"config": {
3334
"sort-packages": true,

lib/AppInfo/Application.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function __construct(array $urlParams = []) {
2929
parent::__construct(self::APP_ID, $urlParams);
3030
}
3131

32+
#[\Override]
3233
public function register(IRegistrationContext $context): void {
3334
include_once __DIR__ . '/../../vendor/autoload.php';
3435

@@ -39,6 +40,7 @@ public function register(IRegistrationContext $context): void {
3940
$context->registerNotifierService(Notifier::class);
4041
}
4142

43+
#[\Override]
4244
public function boot(IBootContext $context): void {
4345
$context->injectFn(function (IEventDispatcher $dispatcher) {
4446
$loginHookAdapter = new class($dispatcher) {

lib/BackgroundJob/ETLJob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function __construct(ETLService $etlService,
3131
*
3232
* @return void
3333
*/
34+
#[\Override]
3435
protected function run($argument) {
3536
$this->etlService->extractAndTransform();
3637
}

lib/BackgroundJob/TrainIpV4OnceJob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct(
3333
*
3434
* @return void
3535
*/
36+
#[\Override]
3637
protected function run($argument) {
3738
try {
3839
$strategy = new Ipv4Strategy();

lib/BackgroundJob/TrainIpV6OnceJob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct(
3333
*
3434
* @return void
3535
*/
36+
#[\Override]
3637
protected function run($argument) {
3738
try {
3839
$strategy = new IpV6Strategy();

lib/BackgroundJob/TrainJobIpV4.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function __construct(
4141
*
4242
* @return void
4343
*/
44+
#[\Override]
4445
protected function run($argument) {
4546
try {
4647
$strategy = new Ipv4Strategy();

lib/BackgroundJob/TrainJobIpV6.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function __construct(
4141
*
4242
* @return void
4343
*/
44+
#[\Override]
4445
protected function run($argument) {
4546
try {
4647
$strategy = new IpV6Strategy();

lib/Db/Model.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Model extends Entity implements JsonSerializable {
6565
protected $createdAt;
6666
protected $addressType;
6767

68+
#[\Override]
6869
#[ReturnTypeWillChange]
6970
public function jsonSerialize(): array {
7071
return [

lib/Listener/LoginListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function __construct(IRequest $request,
4444
$this->loginClassifier = $loginClassifier;
4545
}
4646

47+
#[\Override]
4748
public function handle(Event $event): void {
4849
if (!($event instanceof PostLoginEvent)) {
4950
// Unrelated

lib/Listener/LoginMailListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function __construct(
3434
) {
3535
}
3636

37+
#[\Override]
3738
public function handle(Event $event): void {
3839
if (!($event instanceof SuspiciousLoginEvent)) {
3940
return;

0 commit comments

Comments
 (0)