mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-31 18:31:02 +00:00
Fix PHPStan errors
This commit is contained in:
parent
083dc630fb
commit
0178c7356d
28 changed files with 63 additions and 194 deletions
20
src/Wallabag/CoreBundle/Controller/AbstractController.php
Normal file
20
src/Wallabag/CoreBundle/Controller/AbstractController.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseAbstractController;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
abstract class AbstractController extends BaseAbstractController
|
||||
{
|
||||
/**
|
||||
* @return User|null
|
||||
*/
|
||||
protected function getUser()
|
||||
{
|
||||
$user = parent::getUser();
|
||||
\assert(null === $user || $user instanceof User);
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue