You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the slevomat/coding-standard package dependency allows installation of versions 7.0.19 or higher.
However, as of version 7.1.0 the default behavior of the SlevomatCodingStandard.Functions.FunctionLength sniff has changed such that comments and whitespace are not counted as part of the function length.
This reports a violation of the SlevomatCodingStandard.Functions.FunctionLength for versions of the slevomat/coding-standard package prior to 7.1.0:
$ composer require --dev slevomat/coding-standard:7.0.19
$ vendor/bin/phpcs --sniffs=SlevomatCodingStandard.Functions.FunctionLength file.php
FILE: /path/to/file.php
----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | Your function is too long. Currently using 27 lines. Can be up to 25 lines.
| | (SlevomatCodingStandard.Functions.FunctionLength.FunctionLength)
----------------------------------------------------------------------------------------------------------------------------------------------------------
To resolve this, the minimum version of the slevomat/coding-standard package should be increased to at least 7.1.0.
The text was updated successfully, but these errors were encountered:
aadmathijssen
changed the title
slevomat/coding-standard dependency should be at least 7.1.0 (instead of 7.0.19)slevomat/coding-standard dependency should be at least 7.1.0 (instead of 7.0.19)
Nov 23, 2023
Currently the
slevomat/coding-standard
package dependency allows installation of versions 7.0.19 or higher.However, as of version 7.1.0 the default behavior of the
SlevomatCodingStandard.Functions.FunctionLength
sniff has changed such that comments and whitespace are not counted as part of the function length.From the Slevomat Coding Standard release notes of version 7.1.0:
See for example the following code:
This reports a violation of the
SlevomatCodingStandard.Functions.FunctionLength
for versions of theslevomat/coding-standard
package prior to 7.1.0:To resolve this, the minimum version of the
slevomat/coding-standard
package should be increased to at least 7.1.0.The text was updated successfully, but these errors were encountered: