Skip to content

A free open source IT asset/license management system

Removed unused label constants

snipee2d93ccb6330
diff --git a/app/Models/Labels/Sheets/Avery/L4736_A.php b/app/Models/Labels/Sheets/Avery/L4736_A.php
index 13ccabf71e..35c294a644 100644
--- a/app/Models/Labels/Sheets/Avery/L4736_A.php
+++ b/app/Models/Labels/Sheets/Avery/L4736_A.php
@@ -8,16 +8,12 @@ class L4736_A extends L4736
{
private const BARCODE_MARGIN = 1.80;
- private const TAG_SIZE = 4.80;
-
private const TITLE_SIZE = 3.00;
private const TITLE_MARGIN = 1.80;
private const LABEL_SIZE = 2.8;
- private const LABEL_MARGIN = -0.45;
-
private const FIELD_SIZE = 3.80;
private const FIELD_MARGIN = 0.20;
diff --git a/app/Models/Labels/Sheets/Avery/L6009_A.php b/app/Models/Labels/Sheets/Avery/L6009_A.php
index b7643c4268..f53453ef88 100644
--- a/app/Models/Labels/Sheets/Avery/L6009_A.php
+++ b/app/Models/Labels/Sheets/Avery/L6009_A.php
@@ -8,16 +8,12 @@ class L6009_A extends L6009
{
private const BARCODE_MARGIN = 1.80;
- private const TAG_SIZE = 4.80;
-
private const TITLE_SIZE = 3.00;
private const TITLE_MARGIN = 1.80;
private const LABEL_SIZE = 2.8;
- private const LABEL_MARGIN = -0.45;
-
private const FIELD_SIZE = 3.80;
private const FIELD_MARGIN = 0.20;
diff --git a/app/Models/Labels/Sheets/Avery/L7163_A.php b/app/Models/Labels/Sheets/Avery/L7163_A.php
index 5e3cd5eea3..d331c171d8 100644
--- a/app/Models/Labels/Sheets/Avery/L7163_A.php
+++ b/app/Models/Labels/Sheets/Avery/L7163_A.php
@@ -16,8 +16,6 @@ class L7163_A extends L7163
private const LABEL_SIZE = 3.35;
- private const LABEL_MARGIN = -0.30;
-
private const FIELD_SIZE = 4.80;
private const FIELD_MARGIN = 0.20;
diff --git a/app/Models/Labels/Sheets/Avery/_3490_A.php b/app/Models/Labels/Sheets/Avery/_3490_A.php
index 9ac77f87da..2e717b87c8 100644
--- a/app/Models/Labels/Sheets/Avery/_3490_A.php
+++ b/app/Models/Labels/Sheets/Avery/_3490_A.php
@@ -6,8 +6,6 @@ class _3490_A extends _3490
{
private const BARCODE_MARGIN = 0.075;
- private const TAG_SIZE = 0.125;
-
private const TITLE_SIZE = 0.140;
private const TITLE_MARGIN = 0.040;
diff --git a/app/Models/Labels/Sheets/Avery/_5267_A.php b/app/Models/Labels/Sheets/Avery/_5267_A.php
index d1742a486f..75188dc120 100644
--- a/app/Models/Labels/Sheets/Avery/_5267_A.php
+++ b/app/Models/Labels/Sheets/Avery/_5267_A.php
@@ -8,14 +8,10 @@ class _5267_A extends _5267
private const BARCODE_MARGIN = 0.000;
- private const TAG_SIZE = 0.125;
-
private const TITLE_SIZE = 0.140;
private const FIELD_SIZE = 0.150;
- private const FIELD_MARGIN = 0.012;
-
public function getUnit()
{
return 'in';
diff --git a/app/Models/Labels/Sheets/Avery/_5520_A.php b/app/Models/Labels/Sheets/Avery/_5520_A.php
index e58566b681..484da9635c 100644
--- a/app/Models/Labels/Sheets/Avery/_5520_A.php
+++ b/app/Models/Labels/Sheets/Avery/_5520_A.php
@@ -6,8 +6,6 @@ class _5520_A extends _5520
{
private const BARCODE_MARGIN = 0.075;
- private const TAG_SIZE = 0.125;
-
private const TITLE_SIZE = 0.140;
private const TITLE_MARGIN = 0.040;
diff --git a/app/Models/Labels/Sheets/Avery/_5520_B.php b/app/Models/Labels/Sheets/Avery/_5520_B.php
index ea35a9e750..7149b609ee 100644
--- a/app/Models/Labels/Sheets/Avery/_5520_B.php
+++ b/app/Models/Labels/Sheets/Avery/_5520_B.php
@@ -8,8 +8,6 @@ class _5520_B extends _5520
private const BARCODE_MARGIN = 1.40;
- private const TAG_SIZE = 0.125;
-
private const TITLE_SIZE = 0.140;
private const TITLE_MARGIN = 0.025;
diff --git a/app/Models/Labels/Tapes/Brother/TZe_241.php b/app/Models/Labels/Tapes/Brother/TZe_241.php
index df8e606ad7..e8b9b7820d 100644
--- a/app/Models/Labels/Tapes/Brother/TZe_241.php
+++ b/app/Models/Labels/Tapes/Brother/TZe_241.php
@@ -8,8 +8,6 @@ class TZe_241 extends TZe_18mm
{
private const LABEL_SIZE = 5.0;
- private const LABEL_MARGIN = 0.6;
-
private const FIELD_SIZE = 5.0;
private const FIELD_MARGIN = 0.8;
diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm_C.php b/app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
index fbd541036e..87afb83b8d 100644
--- a/app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
+++ b/app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
@@ -12,18 +12,6 @@ class TZe_24mm_C extends TZe_24mm
private const LOGO_MARGIN = 2.20;
- private const TITLE_SIZE = 2.80;
-
- private const TITLE_MARGIN = 0.50;
-
- private const LABEL_SIZE = 2.00;
-
- private const LABEL_MARGIN = -0.35;
-
- private const FIELD_SIZE = 3.20;
-
- private const FIELD_MARGIN = 0.15;
-
public function getUnit()
{
return 'mm';
diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm_D.php b/app/Models/Labels/Tapes/Brother/TZe_24mm_D.php
index efc172d195..17bb89eb71 100644
--- a/app/Models/Labels/Tapes/Brother/TZe_24mm_D.php
+++ b/app/Models/Labels/Tapes/Brother/TZe_24mm_D.php
@@ -14,8 +14,6 @@ class TZe_24mm_D extends TZe_24mm
private const LABEL_SIZE = 2.50;
- private const LABEL_MARGIN = -0.35;
-
private const FIELD_SIZE = 2.50;
private const FIELD_MARGIN = 0.35;
diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php b/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
index 5dafbb094a..d2fc1522a1 100644
--- a/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
+++ b/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
@@ -16,8 +16,6 @@ class TZe_24mm_E extends TZe_24mm
private const LABEL_SIZE = 2.00;
- private const LABEL_MARGIN = -0.75;
-
private const FIELD_SIZE = 2.80;
private const FIELD_MARGIN = 0.15;
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_11354.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_11354.php
index a01706095b..b013596d42 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_11354.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_11354.php
@@ -22,8 +22,6 @@ class LabelWriter_11354 extends LabelWriter
private const LABEL_SIZE = 2.8;
- private const LABEL_MARGIN = 0.6;
-
public function getUnit()
{
return 'mm';
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
index fc84f73699..dd5d09af23 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
@@ -16,8 +16,6 @@ class LabelWriter_1933081 extends LabelWriter
private const LABEL_SIZE = 2.80;
- private const LABEL_MARGIN = -0.35;
-
private const FIELD_SIZE = 2.80;
private const FIELD_MARGIN = 0.15;
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
index 86eca86780..cb9ca38f6c 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
@@ -16,8 +16,6 @@ class LabelWriter_2112283 extends LabelWriter
private const LABEL_SIZE = 2.80;
- private const LABEL_MARGIN = -0.35;
-
private const FIELD_SIZE = 2.80;
private const FIELD_MARGIN = 0.15;
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
index 1964f033b2..14240f837b 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
@@ -16,11 +16,10 @@ class LabelWriter_2112284 extends LabelWriter
private const LABEL_SIZE = 2.40;
- private const LABEL_MARGIN = -0.25;
-
private const FIELD_SIZE = 2.40;
private const FIELD_MARGIN = 0.10;
+
private const RIGHT_SAFE_OFFSET = 4.0;
public function getUnit()
@@ -68,9 +67,7 @@ class LabelWriter_2112284 extends LabelWriter
return true;
}
- public function preparePDF($pdf)
- {
- }
+ public function preparePDF($pdf) {}
public function write($pdf, $record)
{
@@ -145,9 +142,9 @@ class LabelWriter_2112284 extends LabelWriter
foreach ($fields as $field) {
$rawLabel = $field['label'] ?? null;
- $value = (string)($field['value'] ?? '');
+ $value = (string) ($field['value'] ?? '');
- if (!is_string($rawLabel) || trim($rawLabel) === '') {
+ if (! is_string($rawLabel) || trim($rawLabel) === '') {
static::writeText(
$pdf, $value,
$currentX, $currentY,
@@ -160,7 +157,7 @@ class LabelWriter_2112284 extends LabelWriter
continue;
}
- $labelText = rtrim($rawLabel, ':') . ':';
+ $labelText = rtrim($rawLabel, ':').':';
static::writeText(
$pdf, $labelText,
@@ -191,4 +188,4 @@ class LabelWriter_2112284 extends LabelWriter
);
}
}
-}
\ No newline at end of file
+}
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 85d66c4c5f..c764d1f75f 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -7512,144 +7512,6 @@ parameters:
count: 1
path: app/Models/Labels/Sheet.php
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\L4736_A\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/L4736_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\L4736_A\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/L4736_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\L6009_A\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/L6009_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\L6009_A\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/L6009_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\L7163_A\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/L7163_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\_3490_A\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/_3490_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\_5267_A\:\:FIELD_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/_5267_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\_5267_A\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/_5267_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\_5520_A\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/_5520_A.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Sheets\\Avery\\_5520_B\:\:TAG_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Sheets/Avery/_5520_B.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_241\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_241.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:FIELD_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:FIELD_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:LABEL_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:TITLE_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_C\:\:TITLE_SIZE is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_C.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_D\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_D.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Brother\\TZe_24mm_E\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Dymo\\LabelWriter_11354\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Dymo/LabelWriter_11354.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Dymo\\LabelWriter_1933081\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Dymo\\LabelWriter_2112283\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
-
- -
- message: '#^Constant App\\Models\\Labels\\Tapes\\Dymo\\LabelWriter_2112284\:\:LABEL_MARGIN is unused\.$#'
- identifier: classConstant.unused
- count: 1
- path: app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
-
-
message: '#^Property App\\Models\\Labels\\Tapes\\Generic\\Continuous_53mm\:\:\$tapeHeight is never read, only written\.$#'
identifier: property.onlyWritten