From 9a4ff85cf5cce66a8793c50597c2b40abd5b0955 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Thu, 5 Aug 2021 22:33:04 +0200 Subject: [PATCH] Update phpunit dep for phpstan Signed-off-by: Kevin Decherf --- phpstan.neon | 2 +- .../CoreBundle/ParamConverter/UsernameFeedTokenConverter.php | 2 ++ src/Wallabag/UserBundle/Entity/User.php | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index e981ab187..d57bf9517 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,6 +8,6 @@ parameters: container_xml_path: %rootDir%/../../../var/cache/test/appTestDebugProjectContainer.xml bootstrapFiles: - - vendor/bin/.phpunit/phpunit-8.3-0/vendor/autoload.php + - vendor/bin/.phpunit/phpunit-8.5-0/vendor/autoload.php inferPrivatePropertyTypeFromConstructor: true diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php index e220abfcf..b74881b91 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php @@ -87,5 +87,7 @@ class UsernameFeedTokenConverter implements ParamConverterInterface // Map found user to the route's parameter $request->attributes->set($configuration->getName(), $user); + + return true; } } diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index aeab761db..2c3cced45 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php @@ -373,13 +373,15 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI /** * Only used by the API when creating a new user it'll also return the first client (which was also created at the same time). * - * @return Client + * @return Client|false */ public function getFirstClient() { if (!empty($this->clients)) { return $this->clients->first(); } + + return false; } /**