mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 19:58:53 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -42,53 +42,53 @@ class LabelOptions
|
|||
* @Assert\Positive()
|
||||
* @ORM\Column(type="float")
|
||||
*/
|
||||
protected $width = 50.0;
|
||||
protected float $width = 50.0;
|
||||
|
||||
/**
|
||||
* @var float The page size of the label in mm
|
||||
* @Assert\Positive()
|
||||
* @ORM\Column(type="float")
|
||||
*/
|
||||
protected $height = 30.0;
|
||||
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="string")
|
||||
*/
|
||||
protected $barcode_type = 'none';
|
||||
protected string $barcode_type = 'none';
|
||||
|
||||
/**
|
||||
* @var string What image should be shown along the
|
||||
* @Assert\Choice(choices=LabelOptions::PICTURE_TYPES)
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
protected $picture_type = 'none';
|
||||
protected string $picture_type = 'none';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @Assert\Choice(choices=LabelOptions::SUPPORTED_ELEMENTS)
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
protected $supported_element = 'part';
|
||||
protected string $supported_element = 'part';
|
||||
|
||||
/**
|
||||
* @var string any additional CSS for the label
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
protected $additional_css = '';
|
||||
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="string")
|
||||
*/
|
||||
protected $lines_mode = 'html';
|
||||
protected string $lines_mode = 'html';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
protected $lines = '';
|
||||
protected string $lines = '';
|
||||
|
||||
public function getWidth(): float
|
||||
{
|
||||
|
|
|
@ -50,19 +50,19 @@ class LabelProfile extends AttachmentContainingDBElement
|
|||
* @ORM\Embedded(class="LabelOptions")
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $options;
|
||||
protected LabelOptions $options;
|
||||
|
||||
/**
|
||||
* @var string The comment info for this element
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
protected $comment = '';
|
||||
protected string $comment = '';
|
||||
|
||||
/**
|
||||
* @var bool determines, if this label profile should be shown in the dropdown quick menu
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
protected $show_in_dropdown = true;
|
||||
protected bool $show_in_dropdown = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue