From 1c53e81f1a215468caa114daf5fc06ca7c8da50b Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 13 Dec 2024 02:40:33 +0100 Subject: [PATCH] Lint --- app/Contribution/Documents/BdkjHesse.php | 5 ----- app/Contribution/Documents/CityFrankfurtMainDocument.php | 5 ----- app/Contribution/Documents/CityRemscheidDocument.php | 5 ----- app/Contribution/Documents/CitySolingenDocument.php | 5 ----- app/Contribution/Documents/ContributionDocument.php | 6 ++++++ app/Contribution/Documents/GallierDocument.php | 5 ----- app/Contribution/Documents/RdpNrwDocument.php | 5 ----- 7 files changed, 6 insertions(+), 30 deletions(-) diff --git a/app/Contribution/Documents/BdkjHesse.php b/app/Contribution/Documents/BdkjHesse.php index 63c599ad..ee30ec03 100644 --- a/app/Contribution/Documents/BdkjHesse.php +++ b/app/Contribution/Documents/BdkjHesse.php @@ -116,11 +116,6 @@ class BdkjHesse extends ContributionDocument return $member->birthYear(); } - public function view(): string - { - return 'tex.contribution.bdkj-hesse'; - } - public function setFilename(string $filename): static { $this->filename = $filename; diff --git a/app/Contribution/Documents/CityFrankfurtMainDocument.php b/app/Contribution/Documents/CityFrankfurtMainDocument.php index 285d219e..6d5bed09 100644 --- a/app/Contribution/Documents/CityFrankfurtMainDocument.php +++ b/app/Contribution/Documents/CityFrankfurtMainDocument.php @@ -103,11 +103,6 @@ class CityFrankfurtMainDocument extends ContributionDocument return $member->age(); } - public function view(): string - { - return 'tex.contribution.city-frankfurt-main'; - } - public function setFilename(string $filename): static { $this->filename = $filename; diff --git a/app/Contribution/Documents/CityRemscheidDocument.php b/app/Contribution/Documents/CityRemscheidDocument.php index fd600af0..6233485e 100644 --- a/app/Contribution/Documents/CityRemscheidDocument.php +++ b/app/Contribution/Documents/CityRemscheidDocument.php @@ -78,11 +78,6 @@ class CityRemscheidDocument extends ContributionDocument ); } - public function view(): string - { - return 'tex.contribution.city-remscheid'; - } - public function setFilename(string $filename): static { $this->filename = $filename; diff --git a/app/Contribution/Documents/CitySolingenDocument.php b/app/Contribution/Documents/CitySolingenDocument.php index 2e0b4054..d49b99e3 100644 --- a/app/Contribution/Documents/CitySolingenDocument.php +++ b/app/Contribution/Documents/CitySolingenDocument.php @@ -88,11 +88,6 @@ class CitySolingenDocument extends ContributionDocument return $firstRow . "\n" . $secondRow; } - public function view(): string - { - return 'tex.contribution.city-solingen'; - } - public function getEngine(): Engine { return Engine::PDFLATEX; diff --git a/app/Contribution/Documents/ContributionDocument.php b/app/Contribution/Documents/ContributionDocument.php index 421b00bc..6a494bb4 100644 --- a/app/Contribution/Documents/ContributionDocument.php +++ b/app/Contribution/Documents/ContributionDocument.php @@ -56,4 +56,10 @@ abstract class ContributionDocument extends Document { return Template::make('tex.templates.contribution'); } + + + public function view(): string + { + return 'tex.contribution.' . str(class_basename(static::class))->replace('Document', '')->kebab()->toString(); + } } diff --git a/app/Contribution/Documents/GallierDocument.php b/app/Contribution/Documents/GallierDocument.php index 89517c60..3ab16af2 100644 --- a/app/Contribution/Documents/GallierDocument.php +++ b/app/Contribution/Documents/GallierDocument.php @@ -69,11 +69,6 @@ class GallierDocument extends ContributionDocument ); } - public function view(): string - { - return 'tex.contribution.gallier'; - } - public function setFilename(string $filename): static { $this->filename = $filename; diff --git a/app/Contribution/Documents/RdpNrwDocument.php b/app/Contribution/Documents/RdpNrwDocument.php index 7dae937e..76ae439c 100644 --- a/app/Contribution/Documents/RdpNrwDocument.php +++ b/app/Contribution/Documents/RdpNrwDocument.php @@ -99,11 +99,6 @@ class RdpNrwDocument extends ContributionDocument return $member->age(); } - public function view(): string - { - return 'tex.contribution.rdp-nrw'; - } - public function setFilename(string $filename): static { $this->filename = $filename;