Skip to content

#86: Fix AbstractApiSniff for classes without comment #87

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

Merged
merged 3 commits into from
Apr 18, 2019

Conversation

mzeis
Copy link
Contributor

@mzeis mzeis commented Apr 18, 2019

The sniff doesn't work correctly when there is no comment in the class to test. Therefore, $commentStartPtr is false and the array lookup fails.

Note: the sniff in its current form fails if there are multiple abstract classes defined in one file and one of the classes doesn't have a comment. That happens because we search for the previous comment open tag, regardless of if the tag belongs to the current class we are looking at or to a previous one.

To fix this would be out of scope for #86, though.

@lenaorobei lenaorobei self-requested a review April 18, 2019 17:40
@lenaorobei lenaorobei merged commit 50e189a into magento:develop Apr 18, 2019
magento-devops-reposync-svc pushed a commit that referenced this pull request Oct 1, 2021
…to-coding-standard-301

[Imported] AC-1159: Move eslint tests to magento-coding-standard
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

Successfully merging this pull request may close these issues.

2 participants