MAPG-199 fix issues found by PHPStan

This commit is contained in:
bence committed 2020-07-05 23:18:56 +02:00
1 parent 39d691fd7f
commit af98d71924
34 files changed
+89 -68

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ class GameController
return new JsonContent($this->prepareGame($mapId));
}
private function prepareGame(int $mapId)
private function prepareGame(int $mapId): array
{
$map = $this->mapRepository->getById($mapId);
+1 -1
View File
@@ -128,7 +128,7 @@ class GameFlowController
]);
}
private function addNewRoundToState(&$state, Place $place, array $placesWithoutPano): void
private function addNewRoundToState(array &$state, Place $place, array $placesWithoutPano): void
{
$state['rounds'][] = [
'placesWithoutPano' => $placesWithoutPano,
+1 -1
View File
@@ -161,7 +161,7 @@ class MapAdminController implements ISecured
return new JsonContent(['mapId' => $map->getId(), 'added' => $addedIds]);
}
public function deleteMap()
public function deleteMap(): IContent
{
$mapId = (int) $this->request->query('mapId');
+1 -1
View File
@@ -210,7 +210,7 @@ class UserController implements ISecured
return new JsonContent(['success' => true]);
}
private function confirmUserIdentity(User $user, ?DateTime $authenticatedWithGoogleUntil, ?string $password, &$error): bool
private function confirmUserIdentity(User $user, ?DateTime $authenticatedWithGoogleUntil, ?string $password, string &$error): bool
{
if ($authenticatedWithGoogleUntil !== null && $authenticatedWithGoogleUntil > new DateTime()) {
return true;