Closed
Description
Preconditions
magento/magento-coding-standard
version 12
Steps to reproduce
- Have a class like this:
<?php
declare(strict_types=1);
namespace Some\Namespace;
use Symfony\Component\Console\Output\OutputInterface;
class Progress
{
/** @var OutputInterface */
private $output;
private function methodOne(): bool
{
return false;
}
private function methodTwo(): bool
{
return false;
}
private function methodThree(): bool
{
return false;
}
}
- Run
vendor/bin/phpcs -s --standard=Magento2 --ignore=./vendor/ .
Expected result
- No confusing
Missing short description
andThere must be exactly one blank line before tags
warnings for the$output
parameter
Actual result
- Getting this output:
FILE: Progress.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------
11 | WARNING | Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
11 | WARNING | Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
11 | WARNING | Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
11 | WARNING | There must be exactly one blank line before tags
| | (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
11 | WARNING | There must be exactly one blank line before tags
| | (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
11 | WARNING | There must be exactly one blank line before tags
| | (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
14 | WARNING | Comment block is missing (Magento2.Annotation.MethodArguments.MethodArguments)
19 | WARNING | Comment block is missing (Magento2.Annotation.MethodArguments.MethodArguments)
24 | WARNING | Comment block is missing (Magento2.Annotation.MethodArguments.MethodArguments)
----------------------------------------------------------------------------------------------------------------------------------
Each time I add a new method, 2 more warnings for Missing short description
and There must be exactly one blank line before tags
appear that claim to have something to do with the $output
variable. Which is really confusing.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done