Skip to content

Commit 09811d0

Browse files
authored
Merge pull request #3 from dachcom-digital/aggregation_filter
improve aggregation filter
2 parents b964d3a + 3de265e commit 09811d0

File tree

6 files changed

+218
-147
lines changed

6 files changed

+218
-147
lines changed

.github/workflows/codeception.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,11 @@ jobs:
9191
- name: Verify MySql Connection
9292
run: |
9393
sudo apt-get update
94-
sudo apt-get install -y mysql-client-5.7
94+
sudo apt-get install -y mysql-client
9595
mysql -uroot -h127.0.0.1 -proot -e "SHOW DATABASES"
9696
9797
- name: Setup MySql
9898
run: |
99-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_file_format=Barracuda;"
100-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_large_prefix=1;"
10199
mysql -uroot -h127.0.0.1 -proot -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
102100
103101
- name: Setup Chromium

.github/workflows/ecs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,11 @@ jobs:
8787
- name: Verify MySql Connection
8888
run: |
8989
sudo apt-get update
90-
sudo apt-get install -y mysql-client-5.7
90+
sudo apt-get install -y mysql-client
9191
mysql -uroot -h127.0.0.1 -proot -e "SHOW DATABASES"
9292
9393
- name: Setup MySql
9494
run: |
95-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_file_format=Barracuda;"
96-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_large_prefix=1;"
9795
mysql -uroot -h127.0.0.1 -proot -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
9896
9997
- name: Get Composer Cache Directory
@@ -125,4 +123,4 @@ jobs:
125123
continue-on-error: true
126124
run: |
127125
bin/console cache:warmup --env=test
128-
vendor/bin/ecs check src/DsElasticSearchBundle --config easy-coding-standard.yml
126+
vendor/bin/ecs check src/DsElasticSearchBundle --config ecs.php

.github/workflows/php-stan.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,11 @@ jobs:
8686
- name: Verify MySql Connection
8787
run: |
8888
sudo apt-get update
89-
sudo apt-get install -y mysql-client-5.7
89+
sudo apt-get install -y mysql-client
9090
mysql -uroot -h127.0.0.1 -proot -e "SHOW DATABASES"
9191
9292
- name: Setup MySql
9393
run: |
94-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_file_format=Barracuda;"
95-
mysql -uroot -h127.0.0.1 -proot -e "SET GLOBAL innodb_large_prefix=1;"
9694
mysql -uroot -h127.0.0.1 -proot -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
9795
9896
- name: Get Composer Cache Directory

easy-coding-standard.yml

Lines changed: 0 additions & 108 deletions
This file was deleted.

ecs.php

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?php
2+
3+
use PhpCsFixer\Fixer;
4+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
5+
use Symplify\EasyCodingStandard\ValueObject\Option;
6+
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
7+
8+
return static function (ContainerConfigurator $containerConfigurator): void {
9+
10+
// B. full sets
11+
$parameters = $containerConfigurator->parameters();
12+
$parameters->set(Option::SETS, [SetList::CLEAN_CODE, SetList::PSR_12]);
13+
14+
$services = $containerConfigurator->services();
15+
16+
$services->set(Fixer\Basic\BracesFixer::class)
17+
->call('configure', [
18+
[
19+
'allow_single_line_closure' => true,
20+
]
21+
]);
22+
23+
$services->set(Fixer\PhpTag\BlankLineAfterOpeningTagFixer::class);
24+
25+
$services->set(Fixer\Operator\ConcatSpaceFixer::class)
26+
->call('configure', [
27+
[
28+
'spacing' => 'one',
29+
]
30+
]);
31+
32+
$services->set(Fixer\Operator\NewWithBracesFixer::class);
33+
34+
$services->set(Fixer\Phpdoc\PhpdocAlignFixer::class)
35+
->call('configure', [
36+
[
37+
'tags' => ['method', 'param', 'property', 'return', 'throws', 'type', 'var'],
38+
]
39+
]);
40+
41+
$services->set(Fixer\Operator\BinaryOperatorSpacesFixer::class)
42+
->call('configure', [
43+
[
44+
'align_double_arrow' => true,
45+
]
46+
]);
47+
$services->set(Fixer\Operator\IncrementStyleFixer::class)
48+
->call('configure', [
49+
[
50+
'style' => 'post',
51+
]
52+
]);
53+
54+
$services->set(Fixer\Operator\UnaryOperatorSpacesFixer::class);
55+
$services->set(Fixer\Whitespace\BlankLineBeforeStatementFixer::class);
56+
$services->set(Fixer\CastNotation\CastSpacesFixer::class);
57+
$services->set(Fixer\LanguageConstruct\DeclareEqualNormalizeFixer::class);
58+
$services->set(Fixer\FunctionNotation\FunctionTypehintSpaceFixer::class);
59+
$services->set(Fixer\Comment\SingleLineCommentStyleFixer::class)
60+
->call('configure', [
61+
[
62+
'comment_types' => ['hash'],
63+
]
64+
]);
65+
66+
$services->set(Fixer\ControlStructure\IncludeFixer::class);
67+
$services->set(Fixer\CastNotation\LowercaseCastFixer::class);
68+
$services->set(Fixer\ClassNotation\ClassAttributesSeparationFixer::class)
69+
->call('configure', [
70+
[
71+
'elements' => ['method'],
72+
]
73+
]);
74+
75+
$services->set(Fixer\Casing\NativeFunctionCasingFixer::class);
76+
$services->set(Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer::class);
77+
$services->set(Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer::class);
78+
$services->set(Fixer\Comment\NoEmptyCommentFixer::class);
79+
$services->set(Fixer\Phpdoc\NoEmptyPhpdocFixer::class);
80+
$services->set(Fixer\Phpdoc\PhpdocSeparationFixer::class);
81+
$services->set(Fixer\Semicolon\NoEmptyStatementFixer::class);
82+
$services->set(Fixer\Whitespace\ArrayIndentationFixer::class);
83+
$services->set(Fixer\Whitespace\NoExtraBlankLinesFixer::class)
84+
->call('configure', [
85+
[
86+
'tokens' => ['curly_brace_block', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'throw', 'use'],
87+
]
88+
]);
89+
90+
$services->set(Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer::class);
91+
$services->set(Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer::class);
92+
$services->set(Fixer\CastNotation\NoShortBoolCastFixer::class);
93+
$services->set(Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer::class);
94+
$services->set(Fixer\Whitespace\NoSpacesAroundOffsetFixer::class);
95+
$services->set(Fixer\ControlStructure\NoTrailingCommaInListCallFixer::class);
96+
$services->set(Fixer\ControlStructure\NoUnneededControlParenthesesFixer::class);
97+
$services->set(Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer::class);
98+
$services->set(Fixer\Whitespace\NoWhitespaceInBlankLineFixer::class);
99+
$services->set(Fixer\ArrayNotation\NormalizeIndexBraceFixer::class);
100+
$services->set(Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer::class);
101+
$services->set(Fixer\Phpdoc\PhpdocAnnotationWithoutDotFixer::class);
102+
$services->set(Fixer\Phpdoc\PhpdocIndentFixer::class);
103+
$services->set(Fixer\Phpdoc\PhpdocInlineTagFixer::class);
104+
$services->set(Fixer\Phpdoc\PhpdocNoAccessFixer::class);
105+
$services->set(Fixer\Phpdoc\PhpdocNoEmptyReturnFixer::class);
106+
$services->set(Fixer\Phpdoc\PhpdocNoPackageFixer::class);
107+
$services->set(Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer::class);
108+
$services->set(Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer::class);
109+
$services->set(Fixer\Phpdoc\PhpdocScalarFixer::class);
110+
$services->set(Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer::class);
111+
$services->set(Fixer\Phpdoc\PhpdocSummaryFixer::class);
112+
$services->set(Fixer\Phpdoc\PhpdocToCommentFixer::class);
113+
$services->set(Fixer\Phpdoc\PhpdocTrimFixer::class);
114+
$services->set(Fixer\Phpdoc\PhpdocTypesFixer::class);
115+
$services->set(Fixer\Phpdoc\PhpdocVarWithoutNameFixer::class);
116+
$services->set(Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class);
117+
$services->set(Fixer\ClassNotation\SelfAccessorFixer::class);
118+
$services->set(Fixer\CastNotation\ShortScalarCastFixer::class);
119+
$services->set(Fixer\StringNotation\SingleQuoteFixer::class);
120+
$services->set(Fixer\Semicolon\SpaceAfterSemicolonFixer::class);
121+
$services->set(Fixer\Operator\StandardizeNotEqualsFixer::class);
122+
$services->set(Fixer\Operator\TernaryOperatorSpacesFixer::class);
123+
$services->set(Fixer\ArrayNotation\TrimArraySpacesFixer::class);
124+
$services->set(Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer::class);
125+
126+
$services->set(Fixer\ClassNotation\ClassDefinitionFixer::class)
127+
->call('configure', [
128+
[
129+
'singleLine' => true,
130+
]
131+
]);
132+
133+
$services->set(Fixer\Casing\MagicConstantCasingFixer::class);
134+
$services->set(Fixer\FunctionNotation\MethodArgumentSpaceFixer::class);
135+
$services->set(Fixer\Alias\NoMixedEchoPrintFixer::class)
136+
->call('configure', [
137+
[
138+
'use' => 'echo',
139+
]
140+
]);
141+
142+
$services->set(Fixer\Import\NoLeadingImportSlashFixer::class);
143+
$services->set(Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer::class);
144+
$services->set(Fixer\Phpdoc\PhpdocNoAliasTagFixer::class);
145+
$services->set(Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer::class);
146+
$services->set(Fixer\ClassNotation\SingleClassElementPerStatementFixer::class);
147+
148+
$services->set(Fixer\ClassNotation\NoUnneededFinalMethodFixer::class);
149+
$services->set(Fixer\Semicolon\SemicolonAfterInstructionFixer::class);
150+
151+
$services->set(Fixer\Operator\StandardizeIncrementFixer::class);
152+
};

0 commit comments

Comments
 (0)