File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1111
1212class Psr4Sniff implements Sniff
1313{
14+ /** @var array<string, string> */
1415 public array $ psr4 = [];
16+ /** @var list<string> */
1517 public array $ exclude = [];
1618
1719 /**
@@ -112,10 +114,6 @@ private function checkPsr4(
112114 $ filePath = str_replace ('\\' , '/ ' , $ file ->getFilename ());
113115
114116 foreach ($ this ->psr4 as $ baseNamespace => $ foldersStr ) {
115- if (!is_string ($ baseNamespace ) || !is_string ($ foldersStr )) {
116- continue ;
117- }
118-
119117 $ baseNamespace = trim ($ baseNamespace , '\\' );
120118 if (strpos ($ namespace , $ baseNamespace ) !== 0 ) {
121119 continue ;
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class VariablesNameSniff implements Sniff
4848 ];
4949
5050 public string $ checkType = 'camelCase ' ;
51+ /** @var list<string> */
5152 public array $ ignoredNames = [];
5253 public bool $ ignoreLocalVars = false ;
5354 public bool $ ignoreProperties = false ;
Original file line number Diff line number Diff line change 120120 Slevomat
121121 See https://github.com/slevomat/coding-standard
122122 -->
123+ <rule ref =" SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace" >
124+ <type >warning</type >
125+ </rule >
123126 <rule ref =" SlevomatCodingStandard.Functions.ArrowFunctionDeclaration" >
124127 <type >warning</type >
125128 <properties >
131134 <property name =" spacesCountAroundEqualsSign" type =" integer" value =" 0" />
132135 </properties >
133136 </rule >
137+ <rule ref =" SlevomatCodingStandard.TypeHints.PropertyTypeHint" />
134138 <rule ref =" SlevomatCodingStandard.Whitespaces.DuplicateSpaces" >
135139 <type >warning</type >
136140 <properties >
169173 </rule >
170174 <rule ref =" Generic.WhiteSpace.LanguageConstructSpacing" />
171175 <rule ref =" Generic.WhiteSpace.SpreadOperatorSpacingAfter" />
176+ <rule ref =" Squiz.Arrays.ArrayBracketSpacing" >
177+ <type >warning</type >
178+ </rule >
172179 <rule ref =" Squiz.Classes.LowercaseClassKeywords" />
173180 <rule ref =" Squiz.PHP.CommentedOutCode" >
174181 <properties >
Original file line number Diff line number Diff line change 66
77final class SniffMessages
88{
9+ /** @var array<int, string> */
910 private array $ warnings ;
11+ /** @var array<int, string> */
1012 private array $ errors ;
13+ /** @var array<int, string> */
1114 private array $ messages ;
1215 private bool $ messagesContainTotal = false ;
1316
You can’t perform that action at this time.
0 commit comments