Skip to content

Commit 7f71790

Browse files
Add return types to docblocks for ProblemController.
1 parent 43802c9 commit 7f71790

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Method App\\\\Controller\\\\API\\\\ProblemController\\:\\:addProblemsAction\\(\\) return type has no value type specified in iterable type array\\.$#"
5-
count: 1
6-
path: webapp/src/Controller/API/ProblemController.php
7-
8-
-
9-
message: "#^Method App\\\\Controller\\\\API\\\\ProblemController\\:\\:transformObject\\(\\) has parameter \\$object with no value type specified in iterable type array\\.$#"
10-
count: 1
11-
path: webapp/src/Controller/API/ProblemController.php
123
-
134
message: "#^Method App\\\\FosRestBundle\\\\FlattenExceptionHandler\\:\\:serializeToJson\\(\\) has parameter \\$type with no value type specified in iterable type array\\.$#"
145
count: 1

webapp/src/Controller/API/ProblemController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function __construct(
5757
/**
5858
* Add one or more problems.
5959
*
60+
* @return int[]
6061
* @throws BadRequestHttpException
6162
* @throws NonUniqueResultException
6263
*/
@@ -463,7 +464,7 @@ protected function getIdField(): string
463464

464465
/**
465466
* Transform the given object before returning it from the API.
466-
* @param array $object
467+
* @param array{0: ContestProblem, testdatacount: int} $object
467468
*/
468469
public function transformObject($object): ContestProblem|ContestProblemWrapper
469470
{

0 commit comments

Comments
 (0)