Skip to content

Commit

Permalink
chore: adapt code to new sniffs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrommen committed Jul 24, 2024
1 parent be677e2 commit afd136a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

class Psr4Sniff implements Sniff
{
/** @var array<string, string> */
public array $psr4 = [];
/** @var list<string> */
public array $exclude = [];

/**
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Inpsyde/Sniffs/CodeQuality/VariablesNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class VariablesNameSniff implements Sniff
];

public string $checkType = 'camelCase';
/** @var list<string> */
public array $ignoredNames = [];
public bool $ignoreLocalVars = false;
public bool $ignoreProperties = false;
Expand Down
3 changes: 3 additions & 0 deletions tests/src/SniffMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

final class SniffMessages
{
/** @var array<int, string> */
private array $warnings;
/** @var array<int, string> */
private array $errors;
/** @var array<int, string> */
private array $messages;
private bool $messagesContainTotal = false;

Expand Down

0 comments on commit afd136a

Please sign in to comment.