diff --git a/app/Contribution/Actions/GenerateAction.php b/app/Contribution/Actions/GenerateAction.php index db4ac92f..6f6b1922 100644 --- a/app/Contribution/Actions/GenerateAction.php +++ b/app/Contribution/Actions/GenerateAction.php @@ -3,7 +3,7 @@ namespace App\Contribution\Actions; use App\Contribution\ContributionFactory; -use App\Contribution\Documents\DvDocument; +use App\Contribution\Documents\ContributionDocument; use App\Rules\JsonBase64Rule; use Illuminate\Support\Facades\Validator; use Lorisleiva\Actions\ActionRequest; @@ -17,8 +17,8 @@ class GenerateAction use AsAction; /** - * @param class-string $document - * @param array $payload + * @param class-string $document + * @param array $payload */ public function handle(string $document, array $payload): BaseCompiler { diff --git a/app/Contribution/Documents/ContributionDocument.php b/app/Contribution/Documents/ContributionDocument.php index d5149d3f..9db02c7c 100644 --- a/app/Contribution/Documents/ContributionDocument.php +++ b/app/Contribution/Documents/ContributionDocument.php @@ -8,6 +8,11 @@ abstract class ContributionDocument extends Document { abstract public static function getName(): string; + /** + * @param array $payload + */ + abstract public static function fromRequest(array $payload): static; + /** * @return array */ diff --git a/app/Contribution/Documents/DvDocument.php b/app/Contribution/Documents/DvDocument.php index 949f8292..412233c8 100644 --- a/app/Contribution/Documents/DvDocument.php +++ b/app/Contribution/Documents/DvDocument.php @@ -25,11 +25,6 @@ class DvDocument extends ContributionDocument ) { } - /** - * @param array $payload - */ - abstract public static function fromRequest(array $payload): self; - public function dateRange(): string { return Carbon::parse($this->dateFrom)->format('d.m.Y')