Skip to content

Commit afd136a

Browse files
committed
chore: adapt code to new sniffs
1 parent be677e2 commit afd136a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
class 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;

Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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;

tests/src/SniffMessages.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
final 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

0 commit comments

Comments
 (0)