added project importer and grandtotal converter (#1468)

This commit is contained in:
Kevin Papst
2020-10-11 22:08:00 +02:00
committed by GitHub
parent 0ce02b4f06
commit 996f05c73a
68 changed files with 2827 additions and 384 deletions

View File

@@ -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]);
}
}