mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 09:05:52 +02:00
Apply symplify checkers.
This commit is contained in:
parent
d0b1024d80
commit
349ab706cc
6 changed files with 17 additions and 11 deletions
2
ecs.php
2
ecs.php
|
@ -13,7 +13,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
SetList::CLEAN_CODE,
|
||||
SetList::PSR_12,
|
||||
SetList::SYMFONY,
|
||||
//SetList::SYMPLIFY
|
||||
SetList::SYMPLIFY
|
||||
]);
|
||||
|
||||
$parameters->set(Option::PATHS, [
|
||||
|
|
|
@ -191,9 +191,9 @@ class PartController extends AbstractController
|
|||
|
||||
return $this->render('Parts/edit/edit_part_info.html.twig',
|
||||
[
|
||||
'part' => $part,
|
||||
'part' => $part,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -315,8 +315,8 @@ class PartController extends AbstractController
|
|||
|
||||
return $this->render('Parts/edit/new_part.html.twig',
|
||||
[
|
||||
'part' => $new_part,
|
||||
'part' => $new_part,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,8 @@ class PartListsController extends AbstractController
|
|||
];
|
||||
|
||||
$table = $dataTable->createFromType(PartsDataTable::class, [
|
||||
'search' => $search, 'search_options' => $search_options,
|
||||
'search' => $search,
|
||||
'search_options' => $search_options,
|
||||
])
|
||||
->handleRequest($request);
|
||||
|
||||
|
|
|
@ -50,8 +50,10 @@ use u2flib_server\Registration;
|
|||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="u2f_keys",
|
||||
* uniqueConstraints={@ORM\UniqueConstraint(name="user_unique",columns={"user_id",
|
||||
* "key_handle"})})
|
||||
* uniqueConstraints={
|
||||
* @ORM\UniqueConstraint(name="user_unique",columns={"user_id",
|
||||
* "key_handle"})
|
||||
* })
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
class U2FKey implements TwoFactorKeyInterface
|
||||
|
|
|
@ -39,7 +39,10 @@ class LabelProfileRepository extends NamedDBElementRepository
|
|||
throw new \InvalidArgumentException('Invalid supported_element type given.');
|
||||
}
|
||||
|
||||
return $this->findBy(['options.supported_element' => $type, 'show_in_dropdown' => true], ['name' => 'ASC']);
|
||||
return $this->findBy([
|
||||
'options.supported_element' => $type,
|
||||
'show_in_dropdown' => true,
|
||||
], ['name' => 'ASC']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,10 +57,10 @@ final class BarcodeContentGenerator
|
|||
$type = $this->classToString(self::URL_MAP, $target);
|
||||
|
||||
return $this->urlGenerator->generate('scan_qr', [
|
||||
'type' => $type,
|
||||
'type' => $type,
|
||||
'id' => $target->getID() ?? 0,
|
||||
'_locale' => null,
|
||||
], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||
], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue