mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-19 02:20:09 +01:00
Merge pull request #3172 from wallabag/more-scruti
More Scrutinizer issues fixed
This commit is contained in:
commit
5d03e2d1a5
@ -321,8 +321,7 @@ class EntryController extends Controller
|
||||
|
||||
$pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false);
|
||||
|
||||
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
|
||||
->prepare($pagerAdapter, $page);
|
||||
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')->prepare($pagerAdapter);
|
||||
|
||||
try {
|
||||
$entries->setCurrentPage($page);
|
||||
|
@ -125,8 +125,7 @@ class TagController extends Controller
|
||||
|
||||
$pagerAdapter = new ArrayAdapter($entriesByTag);
|
||||
|
||||
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
|
||||
->prepare($pagerAdapter, $page);
|
||||
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')->prepare($pagerAdapter);
|
||||
|
||||
try {
|
||||
$entries->setCurrentPage($page);
|
||||
|
@ -20,16 +20,15 @@ class PreparePagerForEntries
|
||||
|
||||
/**
|
||||
* @param AdapterInterface $adapter
|
||||
* @param int $page
|
||||
*
|
||||
* @return null|Pagerfanta
|
||||
*/
|
||||
public function prepare(AdapterInterface $adapter, $page = 1)
|
||||
public function prepare(AdapterInterface $adapter)
|
||||
{
|
||||
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
|
||||
|
||||
if (null === $user || !is_object($user)) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
|
||||
$entries = new Pagerfanta($adapter);
|
||||
|
@ -64,7 +64,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
||||
protected $email;
|
||||
|
||||
/**
|
||||
* @var date
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created_at", type="datetime")
|
||||
*
|
||||
@ -73,7 +73,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
||||
protected $createdAt;
|
||||
|
||||
/**
|
||||
* @var date
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated_at", type="datetime")
|
||||
*
|
||||
@ -157,7 +157,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
@ -165,7 +165,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
|
@ -5,7 +5,6 @@ namespace Wallabag\UserBundle\EventListener;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use FOS\UserBundle\Event\UserEvent;
|
||||
use FOS\UserBundle\FOSUserEvents;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
|
||||
@ -47,7 +46,7 @@ class CreateConfigListener implements EventSubscriberInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function createConfig(UserEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)
|
||||
public function createConfig(UserEvent $event)
|
||||
{
|
||||
$config = new Config($event->getUser());
|
||||
$config->setTheme($this->theme);
|
||||
|
Loading…
Reference in New Issue
Block a user