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,13 +17,11 @@
|
|||
* 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\AttachmentType;
|
||||
|
||||
use App\Entity\Parts\Storelocation;
|
||||
use App\Form\AdminPages\StorelocationAdminForm;
|
||||
use App\Services\EntityExporter;
|
||||
|
@ -37,11 +35,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
|||
|
||||
/**
|
||||
* @Route("/store_location")
|
||||
* @package App\Controller
|
||||
*/
|
||||
class StorelocationController extends BaseAdminController
|
||||
{
|
||||
|
||||
protected $entity_class = Storelocation::class;
|
||||
protected $twig_template = 'AdminPages/StorelocationAdmin.html.twig';
|
||||
protected $form_class = StorelocationAdminForm::class;
|
||||
|
@ -56,7 +52,6 @@ class StorelocationController extends BaseAdminController
|
|||
return $this->_delete($request, $entity, $recursionHelper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Route("/{id}/edit", requirements={"id"="\d+"}, name="store_location_edit")
|
||||
* @Route("/{id}", requirements={"id"="\d+"})
|
||||
|
@ -79,9 +74,9 @@ class StorelocationController extends BaseAdminController
|
|||
|
||||
/**
|
||||
* @Route("/export", name="store_location_export_all")
|
||||
* @param Request $request
|
||||
*
|
||||
* @param SerializerInterface $serializer
|
||||
* @param EntityManagerInterface $em
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
|
||||
|
@ -91,13 +86,13 @@ class StorelocationController extends BaseAdminController
|
|||
|
||||
/**
|
||||
* @Route("/{id}/export", name="store_location_export")
|
||||
* @param Request $request
|
||||
*
|
||||
* @param AttachmentType $entity
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function exportEntity(Storelocation $entity, EntityExporter $exporter, Request $request)
|
||||
{
|
||||
return $this->_exportEntity($entity, $exporter, $request);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue