Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -28,24 +28,8 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
*/
class ActivityService
{
/**
* @var ActivityRepository
*/
private $repository;
/**
* @var EventDispatcherInterface
*/
private $dispatcher;
/**
* @var ValidatorInterface
*/
private $validator;
public function __construct(ActivityRepository $activityRepository, EventDispatcherInterface $dispatcher, ValidatorInterface $validator)
public function __construct(private ActivityRepository $repository, private EventDispatcherInterface $dispatcher, private ValidatorInterface $validator)
{
$this->repository = $activityRepository;
$this->dispatcher = $dispatcher;
$this->validator = $validator;
}
public function createNewActivity(?Project $project = null): Activity
@@ -104,6 +88,6 @@ class ActivityService
public function findActivityByName(string $name, ?Project $project = null): ?Activity
{
return $this->repository->findOneBy(['project' => $project->getId(), 'name' => $name]);
return $this->repository->findOneBy(['project' => $project?->getId(), 'name' => $name]);
}
}