Code cleaning

master
Julien Rosset 2 months ago
parent 037806df82
commit fae1d06e93

@ -52,6 +52,9 @@ class MaterialTypeController extends AbstractController {
/** /**
* Edit/Create a material type * Edit/Create a material type
* *
* @param Request $request The request
* @param MaterialType|null $materialType The material type to edit
*
* @return Response The response * @return Response The response
*/ */
#[Route('/Create', name: 'config_materialType_create')] #[Route('/Create', name: 'config_materialType_create')]
@ -78,6 +81,8 @@ class MaterialTypeController extends AbstractController {
/** /**
* Delete a material type * Delete a material type
* *
* @param MaterialType $materialType The material type to delete
*
* @return Response The response * @return Response The response
*/ */
#[Route('/Delete-{id}', name: 'config_materialType_delete')] #[Route('/Delete-{id}', name: 'config_materialType_delete')]

@ -3,31 +3,15 @@
namespace App\Form\Config; namespace App\Form\Config;
use App\Entity\MaterialType; use App\Entity\MaterialType;
use App\Form\Type\CancelButtonType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\RouterInterface;
/** /**
* The form for editing a material type * The form for editing a material type
*/ */
class MaterialTypeEditForm extends AbstractType { class MaterialTypeEditForm extends AbstractType {
/**
* @var RouterInterface The router service
*/
private readonly RouterInterface $router;
/**
* Initialization
*
* @param RouterInterface $router The router service
*/
public function __construct (RouterInterface $router) {
$this->router = $router;
}
/** /**
* @inheritDoc * @inheritDoc
*/ */

Loading…
Cancel
Save