diff --git a/app/Services/TypeScriptModelGenerator/Nodes/Type.php b/app/Services/TypeScriptModelGenerator/Nodes/Type.php index f1d58a5..73ef83f 100644 --- a/app/Services/TypeScriptModelGenerator/Nodes/Type.php +++ b/app/Services/TypeScriptModelGenerator/Nodes/Type.php @@ -16,7 +16,6 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; -use ReflectionAttribute; use ReflectionClass; use ReflectionEnum; use ReflectionEnumBackedCase; @@ -189,15 +188,6 @@ private function mapRelationshipProperty(ReflectionMethod $reflectionMethod): ar $relationshipName .= '[]'; } - // @codeCoverageIgnoreStart - if (collect($reflectionMethod->getAttributes()) - ->filter(fn (ReflectionAttribute $reflectionAttribute) => $reflectionAttribute->getName() === OptionalRelationship::class) - ->isNotEmpty() - ) { - $relationshipName .= ' | '.ReturnType::Null->value; - } - // @codeCoverageIgnoreEnd - return [Str::snake($reflectionMethod->getName()) => $relationshipName]; } diff --git a/app/Services/TypeScriptModelGenerator/Nodes/TypeProperty.php b/app/Services/TypeScriptModelGenerator/Nodes/TypeProperty.php index b7bf31b..dad64b5 100644 --- a/app/Services/TypeScriptModelGenerator/Nodes/TypeProperty.php +++ b/app/Services/TypeScriptModelGenerator/Nodes/TypeProperty.php @@ -2,7 +2,6 @@ namespace App\Services\TypeScriptModelGenerator\Nodes; -use App\Models\Feed; use App\Services\TypeScriptModelGenerator\Enums\ReturnType; use Carbon\Carbon; use Illuminate\Contracts\Support\Arrayable;