Skip to content

Commit

Permalink
code enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Feb 19, 2024
1 parent f70a0f6 commit 9ac120f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
6 changes: 2 additions & 4 deletions src/EventListener/DcaAuthorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@

class DcaAuthorListener
{
/** @var ContaoFramework */
private $framework;
/** @var Security */
private $security;
private ContaoFramework $framework;
private Security $security;

public function __construct(ContaoFramework $framework, Security $security)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Util/ContainerUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@

namespace HeimrichHannot\UtilsBundle\Util;

use Contao\CoreBundle\ContaoCoreBundle;
use Contao\CoreBundle\Framework\ContaoFramework;
use Contao\CoreBundle\Monolog\ContaoContext;
use Contao\CoreBundle\Routing\ScopeMatcher;
use Contao\CoreBundle\Security\Authentication\Token\TokenChecker;
use Contao\Input;
use Contao\PageModel;
use Contao\System;
use HeimrichHannot\UtilsBundle\Util\AbstractServiceSubscriber;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
Expand All @@ -25,8 +22,9 @@
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;

class ContainerUtil extends AbstractServiceSubscriber
class ContainerUtil implements ServiceSubscriberInterface
{
public function __construct(
private ContainerInterface $locator,
Expand Down
4 changes: 0 additions & 4 deletions src/Util/RoutingUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
namespace HeimrichHannot\UtilsBundle\Util;

use Contao\CoreBundle\Csrf\ContaoCsrfTokenManager;
use HeimrichHannot\UtilsBundle\Util\AbstractServiceSubscriber;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;

class RoutingUtil
{

public function __construct(
private ContaoCsrfTokenManager $tokenManager,
private RouterInterface $router,
Expand Down
14 changes: 2 additions & 12 deletions src/Util/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,10 @@

namespace HeimrichHannot\UtilsBundle\Util;

use HeimrichHannot\UtilsBundle\Util\DatabaseUtil;
use HeimrichHannot\UtilsBundle\Util\DcaUtil;
use HeimrichHannot\UtilsBundle\Util\HtmlUtil;
use HeimrichHannot\UtilsBundle\Util\LocaleUtil;
use HeimrichHannot\UtilsBundle\Util\RequestUtil;
use HeimrichHannot\UtilsBundle\Util\UrlUtil;
use HeimrichHannot\UtilsBundle\Util\RoutingUtil;
use HeimrichHannot\UtilsBundle\Util\ArrayUtil;
use HeimrichHannot\UtilsBundle\Util\StringUtil;
use HeimrichHannot\UtilsBundle\Util\AccordionUtil;
use HeimrichHannot\UtilsBundle\Util\UserUtil;
use Psr\Container\ContainerInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;

class Utils extends AbstractServiceSubscriber
class Utils implements ServiceSubscriberInterface
{
/**
* @var ContainerInterface
Expand Down

0 comments on commit 9ac120f

Please sign in to comment.