Skip to content

Undefined index: comment_closer in AbstractApiSniff.php #86

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

Closed
tudalrik-ls opened this issue Apr 17, 2019 · 2 comments
Closed

Undefined index: comment_closer in AbstractApiSniff.php #86

tudalrik-ls opened this issue Apr 17, 2019 · 2 comments
Assignees
Labels
accepted New rule is accepted bug Something isn't working

Comments

@tudalrik-ls
Copy link

tudalrik-ls commented Apr 17, 2019

Preconditions

  1. magento/magento-coding-standard 1.0.2
  2. PHP_CodeSniffer version 3.3.2 (stable) by Squiz (http://www.squiz.net)
  3. PHP 7.2.15-0ubuntu0.18.04.2 (cli) (built: Mar 22 2019 17:05:14) ( NTS )

Steps to reproduce

  1. magento-coding-standard/vendor/bin/phpcs --standard=Magento2 --ignore=magento-coding-standard ./
  2. File content of AbstractArray.php
<?php

namespace LimeSoda\Framework\Option;

abstract class AbstractArray implements OptionArrayInterface
{
}

Expected result

  1. Warnings about missing comments, ...
  2. No error

Actual result

FILE: /test/magento2-framework/Option/AbstractArray.php
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
 1 | ERROR | An error occurred during processing; checking has been aborted. The error message was: Undefined index: comment_closer in
   |       | /test/magento2-framework/magento-coding-standard/Magento2/Sniffs/Classes/AbstractApiSniff.php on line 51
----------------------------------------------------------------------------
Time: 173ms; Memory: 6Mb
@tudalrik-ls tudalrik-ls added the bug Something isn't working label Apr 17, 2019
@mzeis
Copy link
Contributor

mzeis commented Apr 18, 2019

Note: I verified that the problem still exists with the 2.0.0 release.

@lenaorobei lenaorobei added the accepted New rule is accepted label Apr 18, 2019
@mzeis mzeis self-assigned this Apr 18, 2019
mzeis added a commit to mzeis/magento-coding-standard that referenced this issue Apr 18, 2019
lenaorobei added a commit that referenced this issue Apr 18, 2019
#86: Fix AbstractApiSniff for classes without comment
@lenaorobei
Copy link
Contributor

Fixed in #87

loginesta pushed a commit to loginesta/magento-coding-standard that referenced this issue Oct 1, 2021
…gento-coding-standard-300

[Imported] AC-682: Create phpcs static check for RestrictedCodeTest
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

3 participants