Skip to content

Commit b1ccffd

Browse files
authored
Add more useful sniffs.
* Add more useful sniffs.
1 parent b063e6b commit b1ccffd

File tree

12 files changed

+516
-38
lines changed

12 files changed

+516
-38
lines changed

PhpCollective/Sniffs/Classes/Psr4Sniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ protected function addError(
142142

143143
$phpcsFile->addError(
144144
sprintf(
145-
'Class name is not compliant with PSR-4 configuration. ' .
146-
'It should be `%s` instead of `%s`.',
145+
'Class name is not compliant with PSR-4 configuration. '
146+
. 'It should be `%s` instead of `%s`.',
147147
$result->getExpectedClassName(),
148148
$result->getActualClassName(),
149149
),

PhpCollective/Sniffs/Commenting/FullyQualifiedClassNameInDocBlockSniff.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,25 @@ class FullyQualifiedClassNameInDocBlockSniff implements Sniff
2727
* @var array<string>
2828
*/
2929
public static array $whitelistedTypes = [
30-
'string', 'int', 'integer', 'float', 'bool', 'boolean', 'resource', 'null', 'void', 'callable',
31-
'array', 'iterable', 'mixed', 'object', 'false', 'true', 'self', 'static', '$this',
30+
'string',
31+
'int',
32+
'integer',
33+
'float',
34+
'bool',
35+
'boolean',
36+
'resource',
37+
'null',
38+
'void',
39+
'callable',
40+
'array',
41+
'iterable',
42+
'mixed',
43+
'object',
44+
'false',
45+
'true',
46+
'self',
47+
'static',
48+
'$this',
3249
];
3350

3451
/**

0 commit comments

Comments
 (0)