mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added an PHP CS fixer config file and applied it to files.
We now use the same the same style as the symfony project, and it allows us to simply fix the style by executing php_cs_fixer fix in the project root.
This commit is contained in:
parent
89258bc102
commit
e557bdedd5
210 changed files with 2099 additions and 2742 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony)
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
|
@ -17,12 +17,10 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
*/
|
||||
|
||||
namespace App\Controller\AdminPages;
|
||||
|
||||
|
||||
use App\Entity\Attachments\CategoryAttachment;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Form\AdminPages\CategoryAdminForm;
|
||||
|
@ -36,11 +34,9 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
|
||||
/**
|
||||
* @Route("/category")
|
||||
* @package App\Controller
|
||||
*/
|
||||
class CategoryController extends BaseAdminController
|
||||
{
|
||||
|
||||
protected $entity_class = Category::class;
|
||||
protected $twig_template = 'AdminPages/CategoryAdmin.html.twig';
|
||||
protected $form_class = CategoryAdminForm::class;
|
||||
|
@ -49,9 +45,7 @@ class CategoryController extends BaseAdminController
|
|||
|
||||
/**
|
||||
* @Route("/{id}", name="category_delete", methods={"DELETE"})
|
||||
* @param Request $request
|
||||
* @param Category $entity
|
||||
* @param StructuralElementRecursionHelper $recursionHelper
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
public function delete(Request $request, Category $entity, StructuralElementRecursionHelper $recursionHelper)
|
||||
|
@ -62,9 +56,7 @@ class CategoryController extends BaseAdminController
|
|||
/**
|
||||
* @Route("/{id}/edit", requirements={"id"="\d+"}, name="category_edit")
|
||||
* @Route("/{id}", requirements={"id"="\d+"})
|
||||
* @param Category $entity
|
||||
* @param Request $request
|
||||
* @param EntityManagerInterface $em
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function edit(Category $entity, Request $request, EntityManagerInterface $em)
|
||||
|
@ -76,9 +68,6 @@ class CategoryController extends BaseAdminController
|
|||
* @Route("/new", name="category_new")
|
||||
* @Route("/")
|
||||
*
|
||||
* @param Request $request
|
||||
* @param EntityManagerInterface $em
|
||||
* @param EntityImporter $importer
|
||||
* @return Response
|
||||
*/
|
||||
public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer)
|
||||
|
@ -88,9 +77,7 @@ class CategoryController extends BaseAdminController
|
|||
|
||||
/**
|
||||
* @Route("/export", name="category_export_all")
|
||||
* @param EntityManagerInterface $em
|
||||
* @param EntityExporter $exporter
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
|
||||
|
@ -100,14 +87,11 @@ class CategoryController extends BaseAdminController
|
|||
|
||||
/**
|
||||
* @Route("/{id}/export", name="category_export")
|
||||
* @param Category $entity
|
||||
* @param EntityExporter $exporter
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function exportEntity(Category $entity, EntityExporter $exporter, Request $request)
|
||||
{
|
||||
return $this->_exportEntity($entity, $exporter, $request);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue