Skip to content

Commit 1ea6ed9

Browse files
authored
Merge pull request #499 from BitBagCommerce/feature/op-290-code-style
OP-290 - code style
2 parents 8d50d5f + d7df253 commit 1ea6ed9

113 files changed

Lines changed: 1590 additions & 1798 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

features/admin/managing_frequently_asked_questions.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Managing frequently asked questions
1313
Given the store has a frequently asked question
1414
When I go to the frequently asked questions page
1515
And I delete this frequently asked question
16-
Then I should be notified that the fequently asked question has been deleted
16+
Then I should be notified that the frequently asked question has been deleted
1717
And I should see empty list of frequently asked questions
1818

1919
@ui

features/shop/displaying_media.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Feature: Displaying media
1212

1313
@ui
1414
Scenario: Displaying media no standard template
15-
And there is an existing "image" media with "media_with_parameteres" code
15+
And there is an existing "image" media with "media_with_parameters" code
1616
When I go to the homepage
17-
And I want to see a media with code "media_with_parameteres"
17+
And I want to see a media with code "media_with_parameters"

src/Assigner/SectionsAssignerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
interface SectionsAssignerInterface
1616
{
17-
public function assign(SectionableInterface $sectionable, array $sectionsCodes): void;
17+
public function assign(SectionableInterface $sectionsAware, array $sectionsCodes): void;
1818
}

src/Controller/Action/Admin/ImportDataAction.php

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,14 @@
2626

2727
final class ImportDataAction
2828
{
29-
/** @var ImportProcessorInterface */
30-
private $importProcessor;
31-
32-
/** @var FormFactoryInterface */
33-
private $formFactory;
34-
35-
/** @var RequestStack */
36-
private $requestStack;
37-
38-
/** @var FormErrorsFlashHelperInterface */
39-
private $formErrorsFlashHelper;
40-
41-
/** @var TranslatorInterface */
42-
private $translator;
43-
44-
/** @var Environment */
45-
private $twig;
46-
4729
public function __construct(
48-
ImportProcessorInterface $importProcessor,
49-
FormFactoryInterface $formFactory,
50-
RequestStack $requestStack,
51-
FormErrorsFlashHelperInterface $formErrorsFlashHelper,
52-
TranslatorInterface $translator,
53-
Environment $twig,
30+
private ImportProcessorInterface $importProcessor,
31+
private FormFactoryInterface $formFactory,
32+
private RequestStack $requestStack,
33+
private FormErrorsFlashHelperInterface $formErrorsFlashHelper,
34+
private TranslatorInterface $translator,
35+
private Environment $twig,
5436
) {
55-
$this->importProcessor = $importProcessor;
56-
$this->formFactory = $formFactory;
57-
$this->requestStack = $requestStack;
58-
$this->formErrorsFlashHelper = $formErrorsFlashHelper;
59-
$this->translator = $translator;
60-
$this->twig = $twig;
6137
}
6238

6339
public function __invoke(Request $request): Response

src/Controller/Action/Admin/ProductSearchAction.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,11 @@
1919

2020
final class ProductSearchAction
2121
{
22-
/** @var ProductRepositoryInterface */
23-
private $productRepository;
24-
25-
/** @var LocaleContextInterface */
26-
private $localeContext;
27-
28-
/** @var ViewHandler */
29-
private $viewHandler;
30-
3122
public function __construct(
32-
ProductRepositoryInterface $productRepository,
33-
LocaleContextInterface $localeContext,
34-
ViewHandler $viewHandler,
23+
private ProductRepositoryInterface $productRepository,
24+
private LocaleContextInterface $localeContext,
25+
private ViewHandler $viewHandler,
3526
) {
36-
$this->productRepository = $productRepository;
37-
$this->localeContext = $localeContext;
38-
$this->viewHandler = $viewHandler;
3927
}
4028

4129
public function __invoke(Request $request): Response

src/Controller/Action/Admin/TaxonSearchAction.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,11 @@
1919

2020
final class TaxonSearchAction
2121
{
22-
/** @var TaxonRepositoryInterface */
23-
private $taxonRepository;
24-
25-
/** @var LocaleContextInterface */
26-
private $localeContext;
27-
28-
/** @var ViewHandler */
29-
private $viewHandler;
30-
3122
public function __construct(
32-
TaxonRepositoryInterface $taxonRepository,
33-
LocaleContextInterface $localeContext,
34-
ViewHandler $viewHandler,
23+
private TaxonRepositoryInterface $taxonRepository,
24+
private LocaleContextInterface $localeContext,
25+
private ViewHandler $viewHandler,
3526
) {
36-
$this->taxonRepository = $taxonRepository;
37-
$this->localeContext = $localeContext;
38-
$this->viewHandler = $viewHandler;
3927
}
4028

4129
public function __invoke(Request $request): Response

src/Controller/Action/Admin/UploadEditorImageAction.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,11 @@
2323

2424
final class UploadEditorImageAction
2525
{
26-
/** @var MediaProviderResolverInterface */
27-
private $mediaProviderResolver;
28-
29-
/** @var MediaRepositoryInterface */
30-
private $mediaRepository;
31-
32-
/** @var FactoryInterface */
33-
private $mediaFactory;
34-
3526
public function __construct(
36-
MediaProviderResolverInterface $mediaProviderResolver,
37-
MediaRepositoryInterface $mediaRepository,
38-
FactoryInterface $mediaFactory,
27+
private MediaProviderResolverInterface $mediaProviderResolver,
28+
private MediaRepositoryInterface $mediaRepository,
29+
private FactoryInterface $mediaFactory,
3930
) {
40-
$this->mediaProviderResolver = $mediaProviderResolver;
41-
$this->mediaRepository = $mediaRepository;
42-
$this->mediaFactory = $mediaFactory;
4331
}
4432

4533
public function __invoke(Request $request): Response

src/Controller/Helper/FormErrorsFlashHelper.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@
1717

1818
final class FormErrorsFlashHelper implements FormErrorsFlashHelperInterface
1919
{
20-
/** @var RequestStack */
21-
private $requestStack;
22-
23-
/** @var TranslatorInterface */
24-
private $translator;
25-
26-
public function __construct(RequestStack $requestStack, TranslatorInterface $translator)
27-
{
28-
$this->requestStack = $requestStack;
29-
$this->translator = $translator;
20+
public function __construct(
21+
private RequestStack $requestStack,
22+
private TranslatorInterface $translator,
23+
) {
3024
}
3125

3226
public function addFlashErrors(FormInterface $form): void

src/Controller/PageSlugController.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717

1818
final class PageSlugController
1919
{
20-
/** @var SlugGeneratorInterface */
21-
private $slugGenerator;
22-
23-
public function __construct(SlugGeneratorInterface $slugGenerator)
20+
public function __construct(private SlugGeneratorInterface $slugGenerator)
2421
{
25-
$this->slugGenerator = $slugGenerator;
2622
}
2723

2824
public function generateAction(Request $request): JsonResponse

src/EventListener/ResourceDeleteSubscriber.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323

2424
final class ResourceDeleteSubscriber implements EventSubscriberInterface
2525
{
26-
public function __construct(private UrlGeneratorInterface $router, private RequestStack $requestStack)
27-
{
26+
public function __construct(
27+
private UrlGeneratorInterface $router,
28+
private RequestStack $requestStack,
29+
) {
2830
}
2931

3032
public static function getSubscribedEvents(): array

0 commit comments

Comments
 (0)