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

SlevomatCodingStandard.Classes.ClassStructure rule, __invoke method #1471

Closed
zlodes opened this issue Nov 23, 2022 · 2 comments
Closed

SlevomatCodingStandard.Classes.ClassStructure rule, __invoke method #1471

zlodes opened this issue Nov 23, 2022 · 2 comments

Comments

@zlodes
Copy link

zlodes commented Nov 23, 2022

Hi!

Would be nice to have __invoke as independent group. Config example:

<element value="constructor"/>
<element value="invoke"/>
<element value="all public methods"/>
<element value="methods"/>
<element value="magic methods"/>

Code example:

final class Controller
{
    public function __construct()
    {
    }

    public function __invoke()
    {
        $this->doSomething();
    }

    private function doSomething(): void
    {
    }
}

Seems there is a similar issue: #1422,
but this seems easier to implement.

@dpi
Copy link

dpi commented Dec 8, 2022

I think #1098 captures what we want to achieve here.

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants