Use imports instead of FQNs

This commit is contained in:
Jan Böhmer 2023-06-11 14:55:06 +02:00
parent f63b6d7207
commit 5629215ce4
179 changed files with 792 additions and 597 deletions

View file

@ -41,6 +41,7 @@ declare(strict_types=1);
namespace App\Entity\LabelSystem;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
@ -57,53 +58,53 @@ class LabelOptions
* @var float The page size of the label in mm
*/
#[Assert\Positive]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)]
#[ORM\Column(type: Types::FLOAT)]
protected float $width = 50.0;
/**
* @var float The page size of the label in mm
*/
#[Assert\Positive]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)]
#[ORM\Column(type: Types::FLOAT)]
protected float $height = 30.0;
/**
* @var string The type of the barcode that should be used in the label (e.g. 'qr')
*/
#[Assert\Choice(choices: LabelOptions::BARCODE_TYPES)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
#[ORM\Column(type: Types::STRING)]
protected string $barcode_type = 'none';
/**
* @var string What image should be shown along the
*/
#[Assert\Choice(choices: LabelOptions::PICTURE_TYPES)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
#[ORM\Column(type: Types::STRING)]
protected string $picture_type = 'none';
/**
* @var string
*/
#[Assert\Choice(choices: LabelOptions::SUPPORTED_ELEMENTS)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
#[ORM\Column(type: Types::STRING)]
protected string $supported_element = 'part';
/**
* @var string any additional CSS for the label
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
#[ORM\Column(type: Types::TEXT)]
protected string $additional_css = '';
/** @var string The mode that will be used to interpret the lines
*/
#[Assert\Choice(choices: LabelOptions::LINES_MODES)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
#[ORM\Column(type: Types::STRING)]
protected string $lines_mode = 'html';
/**
* @var string
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
#[ORM\Column(type: Types::TEXT)]
protected string $lines = '';
public function getWidth(): float