Skip to content

Commit

Permalink
Merge pull request #366 from localgovdrupal/fix/1.8.x/phpstan-ignore-…
Browse files Browse the repository at this point in the history
…check

[1.8.x] fix: add ignore next line
  • Loading branch information
finnlewis committed Aug 20, 2024
2 parents 9fda642 + bf0942d commit 608682f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Entity/AlertBannerEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public function preSave(EntityStorageInterface $storage) {
$status = (bool) $this->get('status')->value;
if ($status) {
$prefix = 'alert-' . $this->id() . '-';
// @phpstan-ignore-next-line Both sha1 and uniqid are safe to use in this context.
$hash = sha1(uniqid('', TRUE));
$this->setToken($prefix . '-' . $hash);
}
Expand Down

0 comments on commit 608682f

Please sign in to comment.