forked from wallabag/wallabag
Autowire service arguments
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Wallabag\CoreBundle\Event\Subscriber;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
@ -17,7 +17,7 @@ class DownloadImagesSubscriber implements EventSubscriberInterface
|
||||
private $enabled;
|
||||
private $logger;
|
||||
|
||||
public function __construct(EntityManager $em, DownloadImages $downloadImages, $enabled, LoggerInterface $logger)
|
||||
public function __construct(EntityManagerInterface $em, DownloadImages $downloadImages, $enabled, LoggerInterface $logger)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->downloadImages = $downloadImages;
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType;
|
||||
@ -15,6 +14,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
|
||||
class EntryFilterType extends AbstractType
|
||||
{
|
||||
@ -24,7 +24,7 @@ class EntryFilterType extends AbstractType
|
||||
/**
|
||||
* Repository & user are used to get a list of language entries for this user.
|
||||
*/
|
||||
public function __construct(EntityRepository $entryRepository, TokenStorageInterface $tokenStorage)
|
||||
public function __construct(EntryRepository $entryRepository, TokenStorageInterface $tokenStorage)
|
||||
{
|
||||
$this->repository = $entryRepository;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Wallabag\ImportBundle\Import;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
@ -29,7 +29,7 @@ abstract class AbstractImport implements ImportInterface
|
||||
protected $importedEntries = 0;
|
||||
protected $queuedEntries = 0;
|
||||
|
||||
public function __construct(EntityManager $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher)
|
||||
public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->logger = new NullLogger();
|
||||
|
||||
@ -2,12 +2,17 @@
|
||||
|
||||
namespace Wallabag\ImportBundle\Import;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
|
||||
class WallabagV1Import extends WallabagImport
|
||||
{
|
||||
protected $fetchingErrorMessage;
|
||||
protected $fetchingErrorMessageTitle;
|
||||
|
||||
public function __construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
{
|
||||
$this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle;
|
||||
$this->fetchingErrorMessage = $fetchingErrorMessage;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Wallabag\UserBundle\EventListener;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use FOS\UserBundle\Event\UserEvent;
|
||||
use FOS\UserBundle\FOSUserEvents;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
@ -25,7 +25,7 @@ class CreateConfigListener implements EventSubscriberInterface
|
||||
private $listMode;
|
||||
private $session;
|
||||
|
||||
public function __construct(EntityManager $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
|
||||
public function __construct(EntityManagerInterface $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->theme = $theme;
|
||||
|
||||
Reference in New Issue
Block a user