Closed
Description
Preconditions
- Magento Coding Standard containing e64106d.
Steps to reproduce
- Run
phpcs --standard=Magento2 Foo.php
for the following sample file
<?php
namespace Foo\Bar;
class Foo
{
protected function foo()
{
return 1;
}
}
Expected result
- phpcs complains about a missing comment block.
Actual result
- A sniff fails with an error message:
An error occurred during processing; checking has been aborted. The error message was: Undefined index: comment_closer in /path/to/magento-coding-standard/Magento2/Helpers/Commenting/PHPDocFormattingValidator.php on line 142
Alternatively, in some situations the phpcs process hangs in an eternal loop. (Due to ignoring the error and going into the following for
loop with bad limits.)