From 088ea4f0a20468dbcd5921b807dd212db969712d Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 13 Dec 2024 02:28:41 +0100 Subject: [PATCH] Lint --- app/Contribution/Documents/BdkjHesse.php | 6 +----- app/Contribution/Documents/CityFrankfurtMainDocument.php | 6 +----- app/Contribution/Documents/CityRemscheidDocument.php | 5 ----- app/Contribution/Documents/CitySolingenDocument.php | 5 ----- app/Contribution/Documents/ContributionDocument.php | 5 +++++ app/Contribution/Documents/GallierDocument.php | 5 ----- app/Contribution/Documents/RdpNrwDocument.php | 5 ----- 7 files changed, 7 insertions(+), 30 deletions(-) diff --git a/app/Contribution/Documents/BdkjHesse.php b/app/Contribution/Documents/BdkjHesse.php index ebafd8d9..f6170678 100644 --- a/app/Contribution/Documents/BdkjHesse.php +++ b/app/Contribution/Documents/BdkjHesse.php @@ -25,6 +25,7 @@ class BdkjHesse extends ContributionDocument public ?string $filename = '', public string $type = 'F', ) { + $this->setEventName($eventName); } public function dateFrom(): string @@ -114,11 +115,6 @@ class BdkjHesse extends ContributionDocument return $member->birthYear(); } - public function basename(): string - { - return 'zuschuesse-bdkj-hessen' . Str::slug($this->eventName); - } - public function view(): string { return 'tex.contribution.bdkj-hesse'; diff --git a/app/Contribution/Documents/CityFrankfurtMainDocument.php b/app/Contribution/Documents/CityFrankfurtMainDocument.php index 2f9810e5..9d33951a 100644 --- a/app/Contribution/Documents/CityFrankfurtMainDocument.php +++ b/app/Contribution/Documents/CityFrankfurtMainDocument.php @@ -28,6 +28,7 @@ class CityFrankfurtMainDocument extends ContributionDocument public ?string $filename = '', public string $type = 'F', ) { + $this->setEventName($eventName); $this->fromName = app(InvoiceSettings::class)->from_long; } @@ -102,11 +103,6 @@ class CityFrankfurtMainDocument extends ContributionDocument return $member->age(); } - public function basename(): string - { - return 'zuschuesse-frankfurt-' . Str::slug($this->eventName); - } - public function view(): string { return 'tex.contribution.city-frankfurt-main'; diff --git a/app/Contribution/Documents/CityRemscheidDocument.php b/app/Contribution/Documents/CityRemscheidDocument.php index e3afe0ef..56a37bfc 100644 --- a/app/Contribution/Documents/CityRemscheidDocument.php +++ b/app/Contribution/Documents/CityRemscheidDocument.php @@ -77,11 +77,6 @@ class CityRemscheidDocument extends ContributionDocument ); } - public function basename(): string - { - return 'zuschuesse-remscheid'; - } - public function view(): string { return 'tex.contribution.city-remscheid'; diff --git a/app/Contribution/Documents/CitySolingenDocument.php b/app/Contribution/Documents/CitySolingenDocument.php index 2cbe839b..42864fe9 100644 --- a/app/Contribution/Documents/CitySolingenDocument.php +++ b/app/Contribution/Documents/CitySolingenDocument.php @@ -95,11 +95,6 @@ class CitySolingenDocument extends ContributionDocument return $firstRow . "\n" . $secondRow; } - public function basename(): string - { - return 'zuschuesse-solingen-' . Str::slug($this->eventName); - } - public function view(): string { return 'tex.contribution.city-solingen'; diff --git a/app/Contribution/Documents/ContributionDocument.php b/app/Contribution/Documents/ContributionDocument.php index 66491ffb..c2b99d26 100644 --- a/app/Contribution/Documents/ContributionDocument.php +++ b/app/Contribution/Documents/ContributionDocument.php @@ -45,4 +45,9 @@ abstract class ContributionDocument extends Document { $this->eventName = $eventName; } + + public function basename(): string + { + return str('Zuschüsse ')->append($this->getName())->append(' ')->append($this->eventName)->slug(); + } } diff --git a/app/Contribution/Documents/GallierDocument.php b/app/Contribution/Documents/GallierDocument.php index 5652e63b..3b4333c6 100644 --- a/app/Contribution/Documents/GallierDocument.php +++ b/app/Contribution/Documents/GallierDocument.php @@ -67,11 +67,6 @@ class GallierDocument extends ContributionDocument ); } - public function basename(): string - { - return 'zuschuesse-gallier'; - } - public function view(): string { return 'tex.contribution.gallier'; diff --git a/app/Contribution/Documents/RdpNrwDocument.php b/app/Contribution/Documents/RdpNrwDocument.php index c13782db..18a7d15e 100644 --- a/app/Contribution/Documents/RdpNrwDocument.php +++ b/app/Contribution/Documents/RdpNrwDocument.php @@ -98,11 +98,6 @@ class RdpNrwDocument extends ContributionDocument return $member->age(); } - public function basename(): string - { - return 'zuschuesse-rdp-nrw'; - } - public function view(): string { return 'tex.contribution.rdp-nrw';