mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-24 12:16:11 +01:00
[TASK] Narrow down a type in the controller (#1270)
This fixes the last PHPStan level 9 warning.
This commit is contained in:
parent
60145ba685
commit
f8ff931431
2 changed files with 5 additions and 6 deletions
|
@ -42,7 +42,10 @@ class FrontEndEditorController extends ActionController
|
||||||
*/
|
*/
|
||||||
private function getUidOfLoggedInUser(): int
|
private function getUidOfLoggedInUser(): int
|
||||||
{
|
{
|
||||||
return $this->context->getPropertyFromAspect('frontend.user', 'id');
|
$userUid = $this->context->getPropertyFromAspect('frontend.user', 'id');
|
||||||
|
\assert(\is_int($userUid) && $userUid >= 0);
|
||||||
|
|
||||||
|
return $userUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,2 @@
|
||||||
parameters:
|
parameters:
|
||||||
ignoreErrors:
|
ignoreErrors: []
|
||||||
-
|
|
||||||
message: "#^Method TTN\\\\Tea\\\\Controller\\\\FrontEndEditorController\\:\\:getUidOfLoggedInUser\\(\\) should return int\\<0, max\\> but returns mixed\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: Classes/Controller/FrontEndEditorController.php
|
|
||||||
|
|
Loading…
Reference in a new issue