Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Jan 29, 2025
1 parent dec20df commit 0a4f112
Show file tree
Hide file tree
Showing 19 changed files with 75 additions and 88 deletions.
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Admin/LoginAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace AppBundle\Controller\Admin;

use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;

class LoginAction
{
/** @var AuthenticationUtils */
private $authenticationUtils;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(
AuthenticationUtils $authenticationUtils,
WebsiteBlocks $websiteBlocks
ViewRenderer $websiteBlocks
) {
$this->authenticationUtils = $authenticationUtils;
$this->websiteBlocks = $websiteBlocks;
Expand Down
10 changes: 5 additions & 5 deletions sources/AppBundle/Controller/Admin/LostPasswordAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AppBundle\Controller\Admin;

use AppBundle\Association\UserMembership\UserService;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
Expand All @@ -15,17 +15,17 @@ class LostPasswordAction
{
/** @var FormFactoryInterface */
private $formFactory;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;
/** @var FlashBagInterface */
private $flashBag;
/** @var UserService */
private $userPasswordService;

public function __construct(
FormFactoryInterface $formFactory,
UserService $userPasswordService,
WebsiteBlocks $websiteBlocks,
FlashBagInterface $flashBag
UserService $userPasswordService,
ViewRenderer $websiteBlocks,
FlashBagInterface $flashBag
) {
$this->formFactory = $formFactory;
$this->userPasswordService = $userPasswordService;
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/CmsPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use Afup\Site\Corporate\Article;
use Afup\Site\Corporate\Rubrique;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class CmsPageController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
use AppBundle\Association\Model\Repository\CompanyMemberRepository;
use AppBundle\Association\UserMembership\BadgesComputer;
use AppBundle\Offices\OfficesCollection;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\BinaryFileResponse;

class CompanyPublicProfileController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use AppBundle\Association\Model\CompanyMember;
use AppBundle\Association\Model\Repository\CompanyMemberRepository;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class CompanyPublicProfileListController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
use Afup\Site\Corporate\Feuille;
use AppBundle\Event\Model\Repository\TalkRepository;
use AppBundle\Event\Model\Talk;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class HomeController extends Controller
{
public const MAX_ARTICLES = 5;
public const MAX_MEETUPS = 10;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
use AppBundle\Event\Model\Repository\TalkRepository;
use AppBundle\Event\Model\Talk;
use AppBundle\Site\Model\Repository\ArticleRepository;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class HtmlSitemapController extends Controller
{
/** @var UrlGeneratorInterface */
private $urlGenerator;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(UrlGeneratorInterface $urlGenerator, WebsiteBlocks $websiteBlocks)
public function __construct(UrlGeneratorInterface $urlGenerator, ViewRenderer $websiteBlocks)
{
$this->urlGenerator = $urlGenerator;
$this->websiteBlocks = $websiteBlocks;
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/MeetupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace AppBundle\Controller\Website;

use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class MeetupsController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use AppBundle\Association\Model\CompanyMember;
use AppBundle\Association\Model\Repository\CompanyMemberRepository;
use AppBundle\Association\Model\User;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Assert\Assertion;
use Exception;
use Symfony\Component\Form\FormFactoryInterface;
Expand All @@ -21,7 +21,7 @@ class CompanyController
{
/** @var CompanyMemberRepository */
private $companyMemberRepository;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;
/** @var FormFactoryInterface */
private $formFactory;
/** @var FlashBagInterface */
Expand All @@ -33,11 +33,11 @@ class CompanyController

public function __construct(
CompanyMemberRepository $companyMemberRepository,
WebsiteBlocks $websiteBlocks,
FormFactoryInterface $formFactory,
FlashBagInterface $flashBag,
UrlGeneratorInterface $urlGenerator,
Security $security
ViewRenderer $websiteBlocks,
FormFactoryInterface $formFactory,
FlashBagInterface $flashBag,
UrlGeneratorInterface $urlGenerator,
Security $security
) {
$this->companyMemberRepository = $companyMemberRepository;
$this->websiteBlocks = $websiteBlocks;
Expand Down
28 changes: 14 additions & 14 deletions sources/AppBundle/Controller/Website/Member/MembersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use AppBundle\Association\Model\Repository\UserRepository;
use AppBundle\Association\Model\User;
use AppBundle\Model\CollectionFilter;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Assert\Assertion;
use CCMBenchmark\Ting\Repository\CollectionInterface;
use DateTime;
Expand All @@ -36,7 +36,7 @@ class MembersController
private $userRepository;
/** @var CompanyMemberInvitationRepository */
private $companyMemberInvitationRepository;
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;
/** @var FormFactoryInterface */
private $formFactory;
/** @var CollectionFilter */
Expand All @@ -57,19 +57,19 @@ class MembersController
private $eventDispatcher;

public function __construct(
CompanyMemberRepository $companyMemberRepository,
UserRepository $userRepository,
CompanyMemberRepository $companyMemberRepository,
UserRepository $userRepository,
CompanyMemberInvitationRepository $companyMemberInvitationRepository,
WebsiteBlocks $websiteBlocks,
FormFactoryInterface $formFactory,
CollectionFilter $collectionFilter,
UserCompany $userCompany,
Security $security,
FlashBagInterface $flashBag,
CsrfTokenManagerInterface $csrfTokenManager,
UrlGeneratorInterface $urlGenerator,
InvitationMail $invitationMail,
EventDispatcherInterface $eventDispatcher
ViewRenderer $websiteBlocks,
FormFactoryInterface $formFactory,
CollectionFilter $collectionFilter,
UserCompany $userCompany,
Security $security,
FlashBagInterface $flashBag,
CsrfTokenManagerInterface $csrfTokenManager,
UrlGeneratorInterface $urlGenerator,
InvitationMail $invitationMail,
EventDispatcherInterface $eventDispatcher
) {
$this->companyMemberRepository = $companyMemberRepository;
$this->userRepository = $userRepository;
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/MemberController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
use AppBundle\Association\UserMembership\BadgesComputer;
use AppBundle\Association\UserMembership\UserService;
use AppBundle\GeneralMeeting\GeneralMeetingRepository;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class MemberController extends Controller
{
const DAYS_BEFORE_CALL_TO_UPDATE = 15;

private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/MemberShipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use AppBundle\Payment\PayboxResponseFactory;
use AppBundle\Security\LegacyAuthenticator;
use AppBundle\TechLetter\Model\Repository\SendingRepository;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Assert\Assertion;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Finder\Finder;
Expand All @@ -50,9 +50,9 @@ class MemberShipController extends Controller
{
use DbLoggerTrait;

private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
use AppBundle\Site\Form\NewsFiltersType;
use AppBundle\Site\Model\Article;
use AppBundle\Site\Model\Repository\ArticleRepository;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class NewsController extends Controller
{
const ARTICLES_PER_PAGE = 5;

private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/NewsletterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

use AppBundle\Mailchimp\Mailchimp;
use AppBundle\Mailchimp\SubscriberType;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class NewsletterController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
namespace AppBundle\Controller\Website;

use AppBundle\Payment\PayboxResponseFactory;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class PayboxRedirectController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/StaticController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
namespace AppBundle\Controller\Website;

use AppBundle\Offices\OfficesCollection;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class StaticController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
6 changes: 3 additions & 3 deletions sources/AppBundle/Controller/Website/TalksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
use AppBundle\Event\Model\Repository\TalkRepository;
use AppBundle\Offices\OfficesCollection;
use AppBundle\Subtitles\Parser;
use AppBundle\WebsiteBlocks;
use AppBundle\Twig\ViewRenderer;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class TalksController extends Controller
{
private WebsiteBlocks $websiteBlocks;
private ViewRenderer $websiteBlocks;

public function __construct(WebsiteBlocks $websiteBlocks)
public function __construct(ViewRenderer $websiteBlocks)
{
$this->websiteBlocks = $websiteBlocks;
}
Expand Down
Loading

0 comments on commit 0a4f112

Please sign in to comment.