Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoImport] Handle multiple @\ after GenericTagValueNode #5277

Merged
merged 10 commits into from
Nov 25, 2023

Conversation

samsonasik
Copy link
Member

@TomasVotruba continue of PR:

this handle multiple @\ after GenericTagValueNode

@samsonasik
Copy link
Member Author

Closing for now as currently skipped.

@samsonasik samsonasik closed this Nov 23, 2023
@samsonasik samsonasik deleted the after-generic branch November 23, 2023 11:42
@samsonasik
Copy link
Member Author

Re-open, handled with set attribute to marking SpacelessPhpDocTagNode is after generic to make it reprinted.

@@ -22,7 +22,7 @@ public function __toString(): string
{
$value = '';

if ($this->key !== null) {
if ($this->key !== null && ! is_numeric($this->key)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is required as the __toString() cause invalid change 0=@OA conversion on generic:

     * @OA\Property(
     *     type="array",
     *     @OA\Items(ref=@Model(type=TestItem::class))
     * )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated with other usage with is_int($key) to make consistent at PR:

class TwoRoutesAfterGeneric
{
/**
* @OA\Property(type="array", @OA\Items(ref=@Model(type=TestItem::class)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it become single line due to require re-print after it changed after.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it to have faster feedback ot test ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants