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

[TypeDeclaration] Skip __construct in inner class on TypedPropertyFromStrictConstructorRector #2010

Merged
merged 3 commits into from
Apr 5, 2022

Conversation

samsonasik
Copy link
Member

The following code should be skipped as inner class is out of scope:

class SkipInnerClass
{
    /**
     * @var string
     */
    private $name;

    public function __construct(string $name)
    {
        new class {
            public function __construct(string $name)
            {
                $this->name = $name;
            }
        };
    }
}

@samsonasik
Copy link
Member Author

Fixed 🎉

@TomasVotruba
Copy link
Member

👍

@TomasVotruba TomasVotruba enabled auto-merge (squash) April 5, 2022 09:19
@TomasVotruba TomasVotruba merged commit a0ad427 into main Apr 5, 2022
@TomasVotruba TomasVotruba deleted the skip-inner-class branch April 5, 2022 09:23
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