added project importer and grandtotal converter (#1468)
This commit is contained in:
@@ -23,7 +23,7 @@ use InvalidArgumentException;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
final class ProjectService
|
||||
class ProjectService
|
||||
{
|
||||
/**
|
||||
* @var ProjectRepository
|
||||
@@ -38,11 +38,8 @@ final class ProjectService
|
||||
*/
|
||||
private $validator;
|
||||
|
||||
public function __construct(
|
||||
ProjectRepository $projectRepository,
|
||||
EventDispatcherInterface $dispatcher,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
public function __construct(ProjectRepository $projectRepository, EventDispatcherInterface $dispatcher, ValidatorInterface $validator)
|
||||
{
|
||||
$this->repository = $projectRepository;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->validator = $validator;
|
||||
@@ -101,4 +98,9 @@ final class ProjectService
|
||||
|
||||
return $project;
|
||||
}
|
||||
|
||||
public function findProjectByName(string $name): ?Project
|
||||
{
|
||||
return $this->repository->findOneBy(['name' => $name]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user