Skip to content

Commit 42cab8f

Browse files
committed
run ecs
1 parent 37984cd commit 42cab8f

File tree

5 files changed

+48
-6
lines changed

5 files changed

+48
-6
lines changed

src/ContaoManager/Plugin.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212

1313
class Plugin implements BundlePluginInterface, ConfigPluginInterface
1414
{
15-
/**
16-
* @inheritDoc
17-
*/
1815
public function getBundles(ParserInterface $parser)
1916
{
2017
return [

src/Controller/ContentElement/MemberListElementController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class MemberListElementController extends AbstractContentElementController
2020

2121
public function __construct(
2222
private readonly Connection $connection,
23-
)
24-
{
23+
) {
2524
}
2625

2726
protected function getResponse(Template $template, ContentModel $model, Request $request): Response
@@ -44,7 +43,7 @@ protected function getResponse(Template $template, ContentModel $model, Request
4443
$total = $result->rowCount();
4544
$limit = $model->perPage ?? 0;
4645

47-
$page = (int)$request->query->get('mlpage', 0);
46+
$page = (int) $request->query->get('mlpage', 0);
4847
if ($page < 1) {
4948
$page = 1;
5049
}

tools/ecs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor
2+
composer.lock

tools/ecs/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"symplify/easy-coding-standard": "^12.1"
4+
}
5+
}

tools/ecs/ecs.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Fixer\Basic\BracesPositionFixer;
6+
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
7+
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
8+
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
9+
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
10+
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
11+
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
12+
use PhpCsFixer\Fixer\Whitespace\TypeDeclarationSpacesFixer;
13+
use Symplify\EasyCodingStandard\Config\ECSConfig;
14+
15+
return ECSConfig::configure()
16+
->withPaths([
17+
__DIR__ . '/../../src',
18+
])
19+
20+
// add a single rule
21+
->withRules([
22+
NoUnusedImportsFixer::class,
23+
BracesPositionFixer::class,
24+
])
25+
26+
// add sets - group of rules
27+
->withPreparedSets(
28+
arrays: true,
29+
namespaces: true,
30+
spaces: true,
31+
docblocks: true,
32+
comments: true,
33+
// psr12: true,
34+
)
35+
->withSkip([
36+
NotOperatorWithSuccessorSpaceFixer::class
37+
])
38+
39+
;

0 commit comments

Comments
 (0)