diff --git a/app/Fileshare/Actions/FileshareStoreAction.php b/app/Fileshare/Actions/FileshareStoreAction.php index d041ffd6..c5f1dc57 100644 --- a/app/Fileshare/Actions/FileshareStoreAction.php +++ b/app/Fileshare/Actions/FileshareStoreAction.php @@ -11,6 +11,9 @@ class FileshareStoreAction { use AsAction; + /** + * @return array + */ public function rules(): array { return [ @@ -20,7 +23,7 @@ class FileshareStoreAction ]; } - public function asController(ActionRequest $request) + public function asController(ActionRequest $request): void { $type = $request->input('type')::from($request->input('config')); diff --git a/app/Fileshare/Actions/IndexAction.php b/app/Fileshare/Actions/IndexAction.php index 18eb56b5..c37d01d2 100644 --- a/app/Fileshare/Actions/IndexAction.php +++ b/app/Fileshare/Actions/IndexAction.php @@ -5,13 +5,14 @@ namespace App\Fileshare\Actions; use App\Fileshare\Models\FileshareConnection; use App\Fileshare\Resources\FileshareConnectionResource; use Inertia\Inertia; +use Inertia\Response; use Lorisleiva\Actions\Concerns\AsAction; class IndexAction { use AsAction; - public function handle() + public function handle(): Response { session()->put('menu', 'setting'); session()->put('title', 'Datei-Verbindungen'); diff --git a/app/Fileshare/Resources/FileshareConnectionResource.php b/app/Fileshare/Resources/FileshareConnectionResource.php index 2d444d96..c714d757 100644 --- a/app/Fileshare/Resources/FileshareConnectionResource.php +++ b/app/Fileshare/Resources/FileshareConnectionResource.php @@ -2,8 +2,12 @@ namespace App\Fileshare\Resources; +use App\Fileshare\Models\FileshareConnection; use Illuminate\Http\Resources\Json\JsonResource; +/** + * @mixin FileshareConnection + */ class FileshareConnectionResource extends JsonResource { /** diff --git a/database/factories/Fileshare/Models/FileshareConnectionFactory.php b/database/factories/Fileshare/Models/FileshareConnectionFactory.php index 15b53628..9e48f6af 100644 --- a/database/factories/Fileshare/Models/FileshareConnectionFactory.php +++ b/database/factories/Fileshare/Models/FileshareConnectionFactory.php @@ -14,7 +14,7 @@ class FileshareConnectionFactory extends Factory /** * The name of the factory's corresponding model. * - * @var string + * @var class-string */ protected $model = FileshareConnection::class; diff --git a/tests/FileshareTestCase.php b/tests/FileshareTestCase.php index 3dd39ce2..52fa62f5 100644 --- a/tests/FileshareTestCase.php +++ b/tests/FileshareTestCase.php @@ -10,8 +10,8 @@ abstract class FileshareTestCase extends TestCase { use DatabaseTransactions; - protected $adminUser = 'admin'; - protected $adminPassword = 'admin'; + protected string $adminUser = 'admin'; + protected string $adminPassword = 'admin'; public function setUp(): void { diff --git a/tests/TestCase.php b/tests/TestCase.php index b6eab28a..f75fe0f1 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -34,7 +34,7 @@ abstract class TestCase extends BaseTestCase $this->initInertiaTestcase(); } - public function loginNami(int $mglnr = 12345, string $password = 'password', int|Group $groupId = 55): self + public function loginNami(int $mglnr = 12345, string $password = 'password', int|Group $groupId = 55): static { Auth::success($mglnr, $password); $group = is_int($groupId) @@ -57,7 +57,7 @@ abstract class TestCase extends BaseTestCase return $this; } - public function login(): self + public function login(): static { $this->be($user = User::factory()->create()); $this->me = $user;