Skip to content

Commit fdbe414

Browse files
committed
Fix PHPStan issues for src/Serializer/*
All bundled in one commit to not flood the history, all of these should be trivial on itself but help PHPStan to detect more issues. Key,value with only strings as: public const POST_SERIALIZE = 'serializer.post_serialize'
1 parent 03c3ea3 commit fdbe414

File tree

7 files changed

+18
-30
lines changed

7 files changed

+18
-30
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -390,36 +390,6 @@ parameters:
390390
count: 1
391391
path: webapp/src/Helpers/OrdinalArray.php
392392

393-
-
394-
message: "#^Method App\\\\Serializer\\\\ContestProblemVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
395-
count: 1
396-
path: webapp/src/Serializer/ContestProblemVisitor.php
397-
398-
-
399-
message: "#^Method App\\\\Serializer\\\\ContestVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
400-
count: 1
401-
path: webapp/src/Serializer/ContestVisitor.php
402-
403-
-
404-
message: "#^Method App\\\\Serializer\\\\SetExternalIdVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
405-
count: 1
406-
path: webapp/src/Serializer/SetExternalIdVisitor.php
407-
408-
-
409-
message: "#^Method App\\\\Serializer\\\\SubmissionVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
410-
count: 1
411-
path: webapp/src/Serializer/SubmissionVisitor.php
412-
413-
-
414-
message: "#^Method App\\\\Serializer\\\\TeamAffiliationVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
415-
count: 1
416-
path: webapp/src/Serializer/TeamAffiliationVisitor.php
417-
418-
-
419-
message: "#^Method App\\\\Serializer\\\\TeamVisitor\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#"
420-
count: 1
421-
path: webapp/src/Serializer/TeamVisitor.php
422-
423393
-
424394
message: "#^Method App\\\\Service\\\\AwardService\\:\\:getAwards\\(\\) return type has no value type specified in iterable type array\\.$#"
425395
count: 1

webapp/src/Serializer/ContestProblemVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public function __construct(
1919
protected readonly EventLogService $eventLogService
2020
) {}
2121

22+
/**
23+
* @return array<array{event: string, class: string, format: string, method: string}>
24+
*/
2225
public static function getSubscribedEvents(): array
2326
{
2427
return [

webapp/src/Serializer/ContestVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function __construct(
2121
protected readonly EventLogService $eventLogService
2222
) {}
2323

24+
/**
25+
* @return array<array{event: string, class: string, format: string, method: string}>
26+
*/
2427
public static function getSubscribedEvents(): array
2528
{
2629
return [

webapp/src/Serializer/SetExternalIdVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public function __construct(protected readonly EventLogService $eventLogService)
1919
{
2020
}
2121

22+
/**
23+
* @return array<array{event: string, format: string, method: string}>
24+
*/
2225
public static function getSubscribedEvents(): array
2326
{
2427
return [

webapp/src/Serializer/SubmissionVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public function __construct(
2020
protected readonly EntityManagerInterface $em
2121
) {}
2222

23+
/**
24+
* @return array<array{event: string, class: string, format: string, method: string}>
25+
*/
2326
public static function getSubscribedEvents(): array
2427
{
2528
return [

webapp/src/Serializer/TeamAffiliationVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public function __construct(
2424
protected readonly RequestStack $requestStack
2525
) {}
2626

27+
/**
28+
* @return array<array{event: string, class: string, format: string, method: string}>
29+
*/
2730
public static function getSubscribedEvents(): array
2831
{
2932
return [

webapp/src/Serializer/TeamVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function __construct(
2121
protected readonly RequestStack $requestStack
2222
) {}
2323

24+
/**
25+
* @return array<array{event: string, class: string, format: string, method: string}>
26+
*/
2427
public static function getSubscribedEvents(): array
2528
{
2629
return [

0 commit comments

Comments
 (0)