Skip to content

Commit

Permalink
Remove unused private property
Browse files Browse the repository at this point in the history
I found this thanks to Psalm. I was curious to try setting
findUnusedCode to true.
  • Loading branch information
greg0ire committed May 28, 2024
1 parent 827a1b1 commit 2aa9413
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Rules/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,14 @@

class Patterns
{
/** @var Pattern[] */
private $patterns;

/** @var string */
private $regex;

public function __construct(Pattern ...$patterns)
{
$this->patterns = $patterns;

$patterns = array_map(static function (Pattern $pattern): string {
return $pattern->getPattern();
}, $this->patterns);
}, $patterns);

$this->regex = '/^(?:' . implode('|', $patterns) . ')$/i';
}
Expand Down

0 comments on commit 2aa9413

Please sign in to comment.