mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -31,17 +31,11 @@ class IdToEntityDataTransformer implements DataTransformerInterface
|
||||
{
|
||||
private Closure $getId;
|
||||
|
||||
private bool $multiple = false;
|
||||
|
||||
private ObjectRepository $repository;
|
||||
|
||||
/**
|
||||
* @param Closure $getId
|
||||
*/
|
||||
public function __construct(ObjectRepository $repository, bool $multiple = false, ?callable $getId = null)
|
||||
public function __construct(private ObjectRepository $repository, private bool $multiple = false, ?callable $getId = null)
|
||||
{
|
||||
$this->repository = $repository;
|
||||
$this->multiple = $multiple;
|
||||
$this->getId = $getId ?? static fn (object $o) => $o->getId();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user