mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 04:08:57 +02:00
Fixed some more inspection issues
This commit is contained in:
parent
de96aae9a5
commit
29d1d49aca
83 changed files with 153 additions and 172 deletions
|
@ -74,9 +74,9 @@ class GroupController extends BaseAdminController
|
|||
|
||||
//We need to stop the execution here, or our permissions changes will be overwritten by the form values
|
||||
return $this->redirectToRoute('group_edit', ['id' => $entity->getID()]);
|
||||
} else {
|
||||
$this->addFlash('danger', 'csfr_invalid');
|
||||
}
|
||||
|
||||
$this->addFlash('danger', 'csfr_invalid');
|
||||
}
|
||||
|
||||
return $this->_edit($entity, $request, $em, $timestamp);
|
||||
|
|
|
@ -52,7 +52,7 @@ class LogController extends AbstractController
|
|||
{
|
||||
protected EntityManagerInterface $entityManager;
|
||||
protected TimeTravel $timeTravel;
|
||||
protected DBElementRepository $dbRepository;
|
||||
protected EntityRepository $dbRepository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, TimeTravel $timeTravel)
|
||||
{
|
||||
|
|
|
@ -114,9 +114,9 @@ class ProjectController extends AbstractController
|
|||
$request->get('_redirect',
|
||||
$this->generateUrl('project_info', ['id' => $project->getID()]
|
||||
)));
|
||||
} else {
|
||||
$this->addFlash('error', 'project.build.flash.invalid_input');
|
||||
}
|
||||
|
||||
$this->addFlash('error', 'project.build.flash.invalid_input');
|
||||
}
|
||||
|
||||
return $this->renderForm('projects/build/build.html.twig', [
|
||||
|
|
|
@ -106,7 +106,7 @@ class SelectAPIController extends AbstractController
|
|||
3 => $this->translator->trans('export.level.full'),
|
||||
];
|
||||
|
||||
return $this->json(array_map(function ($key, $value) {
|
||||
return $this->json(array_map(static function ($key, $value) {
|
||||
return [
|
||||
'text' => $value,
|
||||
'value' => $key,
|
||||
|
@ -198,7 +198,7 @@ class SelectAPIController extends AbstractController
|
|||
]);
|
||||
//Remove the data-* prefix for each key
|
||||
$data = array_combine(
|
||||
array_map(function ($key) {
|
||||
array_map(static function ($key) {
|
||||
if (strpos($key, 'data-') === 0) {
|
||||
return substr($key, 5);
|
||||
}
|
||||
|
|
|
@ -129,9 +129,9 @@ class UserController extends AdminPages\BaseAdminController
|
|||
|
||||
//We need to stop the execution here, or our permissions changes will be overwritten by the form values
|
||||
return $this->redirectToRoute('user_edit', ['id' => $entity->getID()]);
|
||||
} else {
|
||||
$this->addFlash('danger', 'csfr_invalid');
|
||||
}
|
||||
|
||||
$this->addFlash('danger', 'csfr_invalid');
|
||||
}
|
||||
|
||||
return $this->_edit($entity, $request, $em, $timestamp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue