diff --git a/Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php b/Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php index 7f444eb..b791753 100644 --- a/Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php +++ b/Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php @@ -11,7 +11,9 @@ class Psr4Sniff implements Sniff { + /** @var array */ public array $psr4 = []; + /** @var list */ public array $exclude = []; /** @@ -112,10 +114,6 @@ private function checkPsr4( $filePath = str_replace('\\', '/', $file->getFilename()); foreach ($this->psr4 as $baseNamespace => $foldersStr) { - if (!is_string($baseNamespace) || !is_string($foldersStr)) { - continue; - } - $baseNamespace = trim($baseNamespace, '\\'); if (strpos($namespace, $baseNamespace) !== 0) { continue; diff --git a/Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php b/Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php index fbaef73..3314966 100644 --- a/Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php +++ b/Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php @@ -48,6 +48,7 @@ class VariablesNameSniff implements Sniff ]; public string $checkType = 'camelCase'; + /** @var list */ public array $ignoredNames = []; public bool $ignoreLocalVars = false; public bool $ignoreProperties = false; diff --git a/Inpsyde/ruleset.xml b/Inpsyde/ruleset.xml index cf0aa17..9717eb0 100644 --- a/Inpsyde/ruleset.xml +++ b/Inpsyde/ruleset.xml @@ -120,6 +120,9 @@ Slevomat See https://github.com/slevomat/coding-standard --> + + warning + warning @@ -131,6 +134,7 @@ + warning @@ -169,6 +173,9 @@ + + warning + diff --git a/tests/src/SniffMessages.php b/tests/src/SniffMessages.php index 772ef1e..babb642 100644 --- a/tests/src/SniffMessages.php +++ b/tests/src/SniffMessages.php @@ -6,8 +6,11 @@ final class SniffMessages { + /** @var array */ private array $warnings; + /** @var array */ private array $errors; + /** @var array */ private array $messages; private bool $messagesContainTotal = false;