Skip to content

Commit

Permalink
Extend PHPStan ignore config to support multiple PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
curry684 committed Jan 16, 2025
1 parent 5ee5a77 commit 384c033
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ parameters:
level: max
paths:
- src

# Legacy stuff to be periodically reviewed
ignoreErrors:
- # This error only occurs on PHP 8.1 and can be removed after it's dropped
identifier: offsetAccess.nonOffsetAccessible
path: src/Form/Type/SubmitTimerType.php
count: 1
reportUnmatched: false

excludePaths:
# Obsolete code
- src/Command/StatisticsCommand.php
2 changes: 0 additions & 2 deletions src/Form/Type/SubmitTimerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public function buildView(FormView $view, FormInterface $form, array $options):
$ip = $this->requestStack->getMainRequest()?->getClientIp() ?? self::NO_IP;
$ts = $this->getTimestampMilliseconds();
$secret = $options['secret'];

assert(is_array($view->vars));
$view->vars['value'] = \base64_encode(implode('|', [$ip, $ts, hash('sha256', "$ts|$ip|$secret")]));
}

Expand Down

0 comments on commit 384c033

Please sign in to comment.