Skip to content

Commit

Permalink
Update to PHP 8.1 syntax
Browse files Browse the repository at this point in the history
loevgaard committed Apr 9, 2024
1 parent f5fd387 commit 1600309
Showing 2 changed files with 23 additions and 9 deletions.
17 changes: 17 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81
]);
};
15 changes: 6 additions & 9 deletions src/Checker/StaticConsentChecker.php
Original file line number Diff line number Diff line change
@@ -8,15 +8,12 @@

final class StaticConsentChecker implements ConsentCheckerInterface
{
/** @var array<string, bool> */
private array $consents;

/**
* @param array<string, bool> $consents
*/
public function __construct(array $consents)
{
$this->consents = $consents;
public function __construct(
/**
* @var array<string, bool> $consents
*/
private readonly array $consents,
) {
}

public function isGranted(string $consent): bool

0 comments on commit 1600309

Please sign in to comment.