mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Use constructor property promotion
In accordance with php8.1 use property promotion\ within the constructor method. Less clutter.
This commit is contained in:
parent
ad4fe80240
commit
04a48f22ad
@ -24,12 +24,8 @@ use Symfony\Component\Security\Core\Security;
|
|||||||
*/
|
*/
|
||||||
class StoredObjectVoter extends Voter
|
class StoredObjectVoter extends Voter
|
||||||
{
|
{
|
||||||
private $security;
|
|
||||||
private $storedObjectVoters;
|
|
||||||
|
|
||||||
public function __construct(Security $security, iterable $storedObjectVoters) {
|
public function __construct(private readonly Security $security, private readonly iterable $storedObjectVoters) {
|
||||||
$this->security = $security;
|
|
||||||
$this->storedObjectVoters = $storedObjectVoters;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function supports($attribute, $subject): bool
|
protected function supports($attribute, $subject): bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user