Lint
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2023-03-14 22:36:31 +01:00
parent 6960b0295a
commit f322396fd9
2 changed files with 9 additions and 2 deletions

View File

@ -3,10 +3,12 @@
namespace App\Contribution\Actions;
use App\Contribution\ContributionFactory;
use App\Contribution\Documents\DvDocument;
use App\Rules\JsonBase64Rule;
use Illuminate\Support\Facades\Validator;
use Lorisleiva\Actions\ActionRequest;
use Lorisleiva\Actions\Concerns\AsAction;
use Zoomyboy\Tex\BaseCompiler;
use Zoomyboy\Tex\Compiler;
use Zoomyboy\Tex\Tex;
@ -18,7 +20,7 @@ class GenerateAction
* @param class-string<DvDocument> $document
* @param array<string, mixed> $payload
*/
public function handle(string $document, array $payload): Compiler
public function handle(string $document, array $payload): BaseCompiler
{
return Tex::compile($document::fromRequest($payload));
}
@ -34,7 +36,7 @@ class GenerateAction
}
/**
* @return array<stirng, mixed>
* @return array<string, mixed>
*/
public function rules(): array
{

View File

@ -25,6 +25,11 @@ class DvDocument extends ContributionDocument
) {
}
/**
* @param array<string, mixed> $payload
*/
abstract public static function fromRequest(array $payload): self;
public function dateRange(): string
{
return Carbon::parse($this->dateFrom)->format('d.m.Y')