mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Rised CodeCoverage of ActionService to 100%
This commit is contained in:
@@ -10,7 +10,6 @@ use App\Domain\FormManagement\EntityFormBuilderServiceInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use App\Repository\RepositoryInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use App\Entity\EntityInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -84,9 +83,11 @@ final class ActionService implements ActionServiceInterface
|
||||
/**
|
||||
* @return FormBuilderInterface
|
||||
*/
|
||||
public function getForm(EntityInterface $entity): FormBuilderInterface
|
||||
public function getForm(): FormBuilderInterface
|
||||
{
|
||||
$this->entityFormBuilderService->create($entity);
|
||||
$entity = $this->requestedAction->getRequestedEntity()->getEntity();
|
||||
|
||||
return $this->entityFormBuilderService->create($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -6,7 +6,6 @@ use App\Domain\RequestManagement\Action\RequestedActionInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use App\Repository\RepositoryInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use App\Entity\EntityInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -37,11 +36,9 @@ interface ActionServiceInterface
|
||||
public function getRepository(): RepositoryInterface;
|
||||
|
||||
/**
|
||||
* @param EntityInterface $entity
|
||||
*
|
||||
* @return FormBuilderInterface
|
||||
*/
|
||||
public function getForm(EntityInterface $entity): FormBuilderInterface;
|
||||
public function getForm(): FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @return EntityManagerInterface
|
||||
|
Reference in New Issue
Block a user