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

[Bug] MethodAnnotationStructureSniff causes error when there is no doc comments in the file #38

Closed
lenaorobei opened this issue Feb 11, 2019 · 1 comment
Labels
accepted New rule is accepted bug Something isn't working

Comments

@lenaorobei
Copy link
Contributor

Steps to reproduce

Run phpcs against following code:

<?php

class ClassWithNoAnnotation
{
    protected function methodWithNoAnnotation(){
        //code here
    }
}

Expected result

Warning about missing annotation is displayed.

Actual result

ERROR | An error occurred during processing; checking has been aborted. The error message was: Undefined index: comment_closer in magento-coding-standard/Magento/Sniffs/Annotation/MethodAnnotationStructureSniff.php on line 48 (Internal.Exception)

@lenaorobei
Copy link
Contributor Author

Closing since rules under Annotation section were removed due to unsuitability.
See #54 and #58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted New rule is accepted bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant