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

MethodSpacing not respecting lines count options if attributes used #1718

Open
FateevDev opened this issue Dec 26, 2024 · 0 comments
Open

MethodSpacing not respecting lines count options if attributes used #1718

FateevDev opened this issue Dec 26, 2024 · 0 comments

Comments

@FateevDev
Copy link

use slevomat/coding-standard version 8.15.0
PHP version 8.3.13

I have following config:

    <rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
        <properties>
            <property name="minLinesCount" value="1"/>
            <property name="maxLinesCount" value="1"/>
        </properties>
    </rule>

if i use annotation in second method, rule is not working:

    public function getData(): void
    {
        //method body
    }




    #[Override]
    public function action(): void
    {
        //method body
    }

Current output:
no errors

Expected output:

ERROR | [x] Expected 1 blank line after method, found 4. (SlevomatCodingStandard.Classes.MethodSpacing.IncorrectLinesCountBetweenMethods)
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

No branches or pull requests

1 participant