Closed
Description
Preconditions
The following code comes from Image component:
/**
* Default font size
*/
const DEFAULT_FONT_SIZE = 15;
Steps to reproduce
Test with phpcs
vendor/bin/phpcs --standard=Magento2 lib/internal/Magento/Framework/Image
Expected result
It shall pass
Actual result
FILE:
lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
65 | WARNING | Constants must have short description if they add information beyond what the constant name supplies.
----------------------------------------------------------------------------------------------------------------------
This is misleading information. The code has a description. Also the constant is self-explanatory.
The test checks if the comment is not equal to the variable itself. That leads to situation that the comment needs to be rephrased to something like "Default size for the font" just to pass this test,