Skip to content

Commit 03c3ea3

Browse files
committed
Fix PHPStan issues for src/FosRestBundle/FlattenExceptionHandler.php
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.
1 parent 9c6189b commit 03c3ea3

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,6 @@ parameters:
365365
count: 1
366366
path: webapp/src/Entity/User.php
367367

368-
-
369-
message: "#^Method App\\\\FosRestBundle\\\\FlattenExceptionHandler\\:\\:convertToArray\\(\\) return type has no value type specified in iterable type array\\.$#"
370-
count: 1
371-
path: webapp/src/FosRestBundle/FlattenExceptionHandler.php
372-
373-
-
374-
message: "#^Method App\\\\FosRestBundle\\\\FlattenExceptionHandler\\:\\:getSubscribingMethods\\(\\) return type has no value type specified in iterable type array\\.$#"
375-
count: 1
376-
path: webapp/src/FosRestBundle/FlattenExceptionHandler.php
377-
378368
-
379369
message: "#^Method App\\\\FosRestBundle\\\\FlattenExceptionHandler\\:\\:serializeToJson\\(\\) has parameter \\$type with no value type specified in iterable type array\\.$#"
380370
count: 1

webapp/src/FosRestBundle/FlattenExceptionHandler.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public function __construct(
2222
private readonly bool $debug
2323
) {}
2424

25+
/**
26+
* @return array<array{direction: int, format: string, type: string, method: string}>
27+
*/
2528
public static function getSubscribingMethods(): array
2629
{
2730
return [
@@ -44,6 +47,9 @@ public function serializeToJson(
4447
$type);
4548
}
4649

50+
/**
51+
* @return array{code: int, message: string}
52+
*/
4753
private function convertToArray(
4854
FlattenException $exception,
4955
Context $context

0 commit comments

Comments
 (0)