Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Helpers\ApiDocumentation;
use App\Models\User;
use Dedoc\Scramble\Infer\Extensions\Event\MethodCallEvent;
use Dedoc\Scramble\Infer\Extensions\MethodReturnTypeExtension;
use Dedoc\Scramble\Support\Type\ObjectType;
use Dedoc\Scramble\Support\Type\Type;
use Illuminate\Http\Request;
class RequestUserExtension implements MethodReturnTypeExtension
{
public function shouldHandle(ObjectType $type): bool
{
return $type->isInstanceOf(Request::class);
}
public function getMethodReturnType(MethodCallEvent $event): ?Type
{
if ($event->name === 'user') {
return new ObjectType(User::class);
}
return null;
}
}