Lint
This commit is contained in:
parent
45597558e3
commit
4cfa70e534
|
@ -11,6 +11,9 @@ class FileshareStoreAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
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'));
|
$type = $request->input('type')::from($request->input('config'));
|
||||||
|
|
|
@ -5,13 +5,14 @@ namespace App\Fileshare\Actions;
|
||||||
use App\Fileshare\Models\FileshareConnection;
|
use App\Fileshare\Models\FileshareConnection;
|
||||||
use App\Fileshare\Resources\FileshareConnectionResource;
|
use App\Fileshare\Resources\FileshareConnectionResource;
|
||||||
use Inertia\Inertia;
|
use Inertia\Inertia;
|
||||||
|
use Inertia\Response;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
||||||
class IndexAction
|
class IndexAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
public function handle()
|
public function handle(): Response
|
||||||
{
|
{
|
||||||
session()->put('menu', 'setting');
|
session()->put('menu', 'setting');
|
||||||
session()->put('title', 'Datei-Verbindungen');
|
session()->put('title', 'Datei-Verbindungen');
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
|
|
||||||
namespace App\Fileshare\Resources;
|
namespace App\Fileshare\Resources;
|
||||||
|
|
||||||
|
use App\Fileshare\Models\FileshareConnection;
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @mixin FileshareConnection
|
||||||
|
*/
|
||||||
class FileshareConnectionResource extends JsonResource
|
class FileshareConnectionResource extends JsonResource
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,7 @@ class FileshareConnectionFactory extends Factory
|
||||||
/**
|
/**
|
||||||
* The name of the factory's corresponding model.
|
* The name of the factory's corresponding model.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var class-string<FileshareConnection>
|
||||||
*/
|
*/
|
||||||
protected $model = FileshareConnection::class;
|
protected $model = FileshareConnection::class;
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ abstract class FileshareTestCase extends TestCase
|
||||||
{
|
{
|
||||||
use DatabaseTransactions;
|
use DatabaseTransactions;
|
||||||
|
|
||||||
protected $adminUser = 'admin';
|
protected string $adminUser = 'admin';
|
||||||
protected $adminPassword = 'admin';
|
protected string $adminPassword = 'admin';
|
||||||
|
|
||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ abstract class TestCase extends BaseTestCase
|
||||||
$this->initInertiaTestcase();
|
$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);
|
Auth::success($mglnr, $password);
|
||||||
$group = is_int($groupId)
|
$group = is_int($groupId)
|
||||||
|
@ -57,7 +57,7 @@ abstract class TestCase extends BaseTestCase
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function login(): self
|
public function login(): static
|
||||||
{
|
{
|
||||||
$this->be($user = User::factory()->create());
|
$this->be($user = User::factory()->create());
|
||||||
$this->me = $user;
|
$this->me = $user;
|
||||||
|
|
Loading…
Reference in New Issue