-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
[TypeDeclaration] Add class method param type resolving by property #3081
Conversation
9a40653
to
4360401
Compare
cc @staabm |
8ff4476
to
0300989
Compare
...ests/Rector/FunctionLike/ParamTypeDeclarationRector/Fixture/infer_from_property_type.php.inc
Outdated
Show resolved
Hide resolved
...ests/Rector/FunctionLike/ParamTypeDeclarationRector/Fixture/infer_from_property_type.php.inc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for working on it. The test case shows what I expected.
Cannot judge the implementation... not much AST experience on my end
Maybe its a different topic, but I would also add the following example (Same idea but with typed property) Before class InferFromPropertyType
{
private int $id;
public function setId($id)
{
$this->id = $id;
}
} After class InferFromPropertyType
{
private int $id;
public function setId(int $id)
{
$this->id = $id;
}
} |
Thanks, any review and feedback helps me 👍 . I'm blinded by my own ego. |
Good idea, I'll add new type inferer. |
dd89f44
to
6be7a12
Compare
6be7a12
to
5df24b4
Compare
rectorphp/rector-src@23c2282 [ci] run phpstan on packages too to detect bugs in configs (#3081)
Closes #2887