Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2019-09-16 22:04:59 +02:00
parent f7c2f1032f
commit 21a81486df
24 changed files with 64 additions and 84 deletions

View file

@ -41,7 +41,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
/**
* @Route("/attachment_type")

View file

@ -108,7 +108,9 @@ abstract class BaseAdminController extends AbstractController
$this->addFlash('success', $this->translator->trans('entity.created_flash'));
return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]);
} elseif ($form->isSubmitted() && ! $form->isValid()) {
}
if ($form->isSubmitted() && ! $form->isValid()) {
$this->addFlash('error', $this->translator->trans('entity.created_flash.invalid'));
}

View file

@ -32,7 +32,6 @@
namespace App\Controller\AdminPages;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Parts\Category;
use App\Form\AdminPages\CategoryAdminForm;
use App\Services\EntityExporter;
@ -42,7 +41,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
/**
* @Route("/category")

View file

@ -32,7 +32,6 @@
namespace App\Controller\AdminPages;
use App\Entity\Attachments\AttachmentType;
use App\Entity\PriceInformations\Currency;
use App\Form\AdminPages\CurrencyAdminForm;
use App\Services\EntityExporter;
@ -42,7 +41,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
/**
* @Route("/currency")

View file

@ -32,8 +32,6 @@
namespace App\Controller\AdminPages;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Devices\Device;
use App\Form\AdminPages\BaseEntityAdminForm;
use App\Services\EntityExporter;
@ -43,7 +41,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
/**
* @Route("/device")