mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
Fixed code style.
This commit is contained in:
parent
2853e471c4
commit
d0b1024d80
212 changed files with 495 additions and 1005 deletions
|
@ -51,8 +51,6 @@ final class BarcodeContentGenerator
|
|||
|
||||
/**
|
||||
* Generates a fixed URL to the given Element that can be embedded in a 2D code (e.g. QR code).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getURLContent(AbstractDBElement $target): string
|
||||
{
|
||||
|
@ -68,8 +66,6 @@ final class BarcodeContentGenerator
|
|||
/**
|
||||
* Returns a Code that can be used in a 1D barcode.
|
||||
* The return value has a format of "L0123".
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get1DBarcodeContent(AbstractDBElement $target): string
|
||||
{
|
||||
|
|
|
@ -102,7 +102,7 @@ final class BarcodeExampleElementsGenerator
|
|||
|
||||
private function getStructuralData(string $class): AbstractStructuralDBElement
|
||||
{
|
||||
if (! is_a($class, AbstractStructuralDBElement::class, true)) {
|
||||
if (!is_a($class, AbstractStructuralDBElement::class, true)) {
|
||||
throw new \InvalidArgumentException('$class must be an child of AbstractStructuralDBElement');
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ final class BarcodeNormalizer
|
|||
/**
|
||||
* Parses barcode content and normalizes it.
|
||||
* Returns an array in the format ['part', 1]: First entry contains element type, second the ID of the element.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function normalizeBarcodeContent(string $input): array
|
||||
{
|
||||
|
@ -55,7 +53,7 @@ final class BarcodeNormalizer
|
|||
$prefix = $matches[1];
|
||||
$id = (int) $matches[2];
|
||||
|
||||
if (! isset(self::PREFIX_TYPE_MAP[$prefix])) {
|
||||
if (!isset(self::PREFIX_TYPE_MAP[$prefix])) {
|
||||
throw new \InvalidArgumentException('Unknown prefix '.$prefix);
|
||||
}
|
||||
|
||||
|
@ -67,7 +65,7 @@ final class BarcodeNormalizer
|
|||
$prefix = $matches[1];
|
||||
$id = (int) $matches[2];
|
||||
|
||||
if (! isset(self::PREFIX_TYPE_MAP[$prefix])) {
|
||||
if (!isset(self::PREFIX_TYPE_MAP[$prefix])) {
|
||||
throw new \InvalidArgumentException('Unknown prefix '.$prefix);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ final class BarcodeRedirector
|
|||
* @param string $type The type of the element that was scanned (e.g. 'part', 'lot', etc.)
|
||||
* @param int $id The ID of the element that was scanned
|
||||
*
|
||||
* @return string The URL to which should be redirected.
|
||||
* @return string the URL to which should be redirected
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue