Skip to content

Commit d12c2a5

Browse files
Merge pull request #84 from VincentLanglet/addSniff
✨ AddSniff
2 parents 2c6cf3c + 831da0c commit d12c2a5

File tree

6 files changed

+17
-107
lines changed

6 files changed

+17
-107
lines changed

SymfonyCustom/Sniffs/Formatting/BlankLineBeforeReturnSniff.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ public function process(File $phpcsFile, $stackPtr): void
7272
$phpcsFile->fixer->endChangeset();
7373
}
7474
}
75-
76-
return;
7775
}
7876

7977
/**

SymfonyCustom/Sniffs/Scope/MethodScopeSniff.php

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

SymfonyCustom/Tests/Scope/MethodScopeUnitTest.inc

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

SymfonyCustom/Tests/Scope/MethodScopeUnitTest.php

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

SymfonyCustom/ruleset.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,31 @@
7070
<!-- Disallow -->
7171
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
7272
<rule ref="Generic.CodeAnalysis.EmptyPHPStatement"/>
73+
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
74+
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
75+
<rule ref="Generic.PHP.BacktickOperator"/>
7376
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
7477
<rule ref="Generic.PHP.ForbiddenFunctions"/>
7578
<rule ref="PEAR.Commenting.InlineComment"/>
79+
<rule ref="Squiz.PHP.CommentedOutCode"/>
80+
<rule ref="Squiz.PHP.DisallowMultipleAssignments"/>
81+
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
7682
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
83+
<rule ref="Squiz.PHP.Eval"/>
84+
<rule ref="Squiz.PHP.NonExecutableCode"/>
7785
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
7886

7987
<!-- Others -->
88+
<rule ref="Generic.Strings.UnnecessaryStringConcat">
89+
<properties>
90+
<property name="allowMultiline" value="true"/>
91+
</properties>
92+
</rule>
8093
<rule ref="Squiz.Classes.ClassFileName"/>
8194
<rule ref="Squiz.Commenting.DocCommentAlignment">
8295
<exclude name="Squiz.Commenting.DocCommentAlignment.SpaceAfterStar"/>
8396
</rule>
97+
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
8498
<rule ref="Squiz.NamingConventions.ValidVariableName">
8599
<exclude name="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
86100
<exclude name="Squiz.NamingConventions.ValidVariableName.ContainsNumbers"/>
@@ -90,6 +104,7 @@
90104
<rule ref="Squiz.Strings.DoubleQuoteUsage">
91105
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar"/>
92106
</rule>
107+
<rule ref="Squiz.Strings.EchoedStrings"/>
93108

94109
<!-- Custom -->
95110
<rule ref="SymfonyCustom.Commenting.FunctionComment">

TwigCS/Report/Report.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public function getMessages(array $filters = []): array
8585
}
8686

8787
return array_filter($this->messages, function (SniffViolation $message) use ($filters) {
88-
$fileFilter = $levelFilter = true;
88+
$fileFilter = true;
89+
$levelFilter = true;
8990

9091
if (isset($filters['file']) && $filters['file']) {
9192
$fileFilter = (string) $message->getFilename() === (string) $filters['file'];

0 commit comments

Comments
 (0)