Skip to content

Callable type#2884

Merged
TomasVotruba merged 2 commits intomasterfrom
callable-type
Feb 19, 2020
Merged

Callable type#2884
TomasVotruba merged 2 commits intomasterfrom
callable-type

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Feb 19, 2020

Covers #2881

@snapshotpl This is the best I could do. The return mixed is removed, as its default value and it would polute all the callables by default.

@TomasVotruba TomasVotruba force-pushed the callable-type branch 2 times, most recently from 1d96f0b to e09c2ce Compare February 19, 2020 00:17
@snapshotpl
Copy link
Copy Markdown
Contributor

Looks like missing mixed is a problem... phpstan/phpstan#3008

@snapshotpl
Copy link
Copy Markdown
Contributor

@TomasVotruba did you see that ^^ ?

@TomasVotruba
Copy link
Copy Markdown
Member Author

tl;dr; I don't have time for this part anymore, but I can guide you in the possible fix

@snapshotpl
Copy link
Copy Markdown
Contributor

@TomasVotruba waiting for hints :)

@TomasVotruba
Copy link
Copy Markdown
Member Author

You need to detect format of original content in:
https://github.com/rectorphp/rector/blob/3dd1e7ca6929301fe5889d2bb721c3eba426f7d4/packages/attribute-aware-php-doc/src/Ast/Type/AttributeAwareCallableTypeNode.php

Then modify __toString() method to reflect it

TomasVotruba added a commit that referenced this pull request Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants