From 39d4558eaf5fa5fd6060a0f202b22bcec5a982dc Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 9 Oct 2026 15:09:38 +0200 Subject: =?UTF-8?q?variables=20d=C3=A9plac=C3=A9es=20dans=20Config,=20supp?= =?UTF-8?q?ressions=20constructeurs=20Latex.php,=20=C3=A9bauche=20de=20sec?= =?UTF-8?q?tion=206=5Fadvertising,=20un=20peu=20de=20typage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Latex.php | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'src/Latex.php') diff --git a/src/Latex.php b/src/Latex.php index b254551..261d35e 100644 --- a/src/Latex.php +++ b/src/Latex.php @@ -150,31 +150,21 @@ abstract class PrestaLatex extends Latex } class DevisLatex extends PrestaLatex // extends Latex { - public function __construct() - { - $this->type = 'devis'; - } + protected string $type = 'devis'; } class FactureLatex extends PrestaLatex // extends Latex { - public function __construct() - { - $this->type = 'facture'; - } + protected string $type = 'facture'; } class LocationLatex extends PrestaLatex // extends Latex { - public function __construct() - { - $this->type = 'location'; - } + protected string $type = 'location'; } class EnveloppeRectoLatex extends Latex { - public function __construct() - { - $this->type = 'enveloppe_recto'; + protected string $type = 'enveloppe_recto'; + public function __construct(){ $this->latex_path = Config::$latex_path . 'enveloppes_recto/'; $this->pdf_path = Config::$pdf_path . 'enveloppes_recto/'; } @@ -194,10 +184,9 @@ class EnveloppeRectoLatex extends Latex } class EnveloppeVersoLatex extends Latex { - public function __construct() - { - $this->type = 'enveloppe_verso'; - $this->file_name = 'enveloppe_verso.tex'; + protected string $type = 'enveloppe_verso'; + protected string $file_name = 'enveloppe_verso.tex'; + public function __construct(){ $this->latex_path = Config::$latex_path; $this->pdf_path = Config::$pdf_path; } -- cgit v1.2.3