Skip to content

Commit ac3d6d6

Browse files
committed
phpstan
1 parent 39015b6 commit ac3d6d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"scripts": {
4141
"cs-check": "vendor/bin/phpcs --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=/tests/test_files/ --extensions=php -p src/ tests/",
4242
"cs-fix": "vendor/bin/phpcbf --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=/tests/test_files/ --extensions=php -p src/ tests/",
43-
"phpstan": "phpstan analyse -l 5 -c tests/phpstan.neon src/"
43+
"phpstan": "vendor/bin/phpstan analyse -l 5 -c tests/phpstan.neon src/"
4444
}
4545
}

src/Controller/Component/BruteforceComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function applyProtection(string $name, array $keyNames, array $data, arra
7373

7474
foreach ($ipData['attempts'] as $attempt) {
7575
/** @var \Bruteforce\Challenge $oldChallenge */
76-
$oldChallenge = unserialize($attempt['challenge'], [Challenge::class]);
76+
$oldChallenge = unserialize($attempt['challenge'], ['allowed_classes' => [Challenge::class]]);
7777
// no need to applyProtection and count this challenge if it is identical to a previous challenge attempt
7878
if ($newChallenge->matchesAnOldChallenge($oldChallenge)) {
7979
return; // if reached here, that means exactly same attempt previously - do not count

0 commit comments

Comments
 (0)