Skip to content

Commit 0bb685f

Browse files
committed
Change return types to match interface
1 parent 25f8efc commit 0bb685f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/InertiaResponseRenderer.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
use Inertia\Inertia;
66
use Illuminate\Support\Str;
7-
use Illuminate\Http\Response;
87
use Illuminate\Support\Facades\File;
9-
use Illuminate\Http\RedirectResponse;
108
use Arcanist\Contracts\ResponseRenderer;
119
use Illuminate\Contracts\Support\Renderable;
1210
use Illuminate\Contracts\Support\Responsable;
11+
use Symfony\Component\HttpFoundation\Response;
1312
use Arcanist\Exception\StepTemplateNotFoundException;
1413

1514
class InertiaResponseRenderer implements ResponseRenderer
@@ -18,8 +17,11 @@ public function __construct(private string $componentBasePath)
1817
{
1918
}
2019

21-
public function renderStep(WizardStep $step, AbstractWizard $wizard, array $data = []): Response | Responsable | Renderable
22-
{
20+
public function renderStep(
21+
WizardStep $step,
22+
AbstractWizard $wizard,
23+
array $data = []
24+
): Response | Responsable | Renderable {
2325
$component = $this->componentBasePath . '/' . Str::studly($wizard::$slug) . '/' . Str::studly($step->slug);
2426
$componentPath = resource_path('js/Pages/' . $component . '.vue');
2527

@@ -37,7 +39,7 @@ public function renderStep(WizardStep $step, AbstractWizard $wizard, array $data
3739
return Inertia::render($component, $viewData);
3840
}
3941

40-
public function redirect(WizardStep $step, AbstractWizard $wizard): RedirectResponse
42+
public function redirect(WizardStep $step, AbstractWizard $wizard): Response | Responsable | Renderable
4143
{
4244
if (!$wizard->exists()) {
4345
return redirect()->route('wizard.' . $wizard::$slug . '.create');
@@ -49,8 +51,11 @@ public function redirect(WizardStep $step, AbstractWizard $wizard): RedirectResp
4951
);
5052
}
5153

52-
public function redirectWithError(WizardStep $step, AbstractWizard $wizard, ?string $error = null): RedirectResponse
53-
{
54+
public function redirectWithError(
55+
WizardStep $step,
56+
AbstractWizard $wizard,
57+
?string $error = null
58+
): Response | Responsable | Renderable {
5459
return redirect()->route(
5560
'wizard.' . $wizard::$slug . '.show',
5661
[$wizard->getId(), $step->slug]

0 commit comments

Comments
 (0)