-
-
Couldn't load subscription status.
- Fork 292
Open
Description
| Q | A |
|---|---|
| Bug report? | maybe |
| Feature request? | no |
| Library version | dev-master (f476219) |
I have a large function that only returns an array, and I'm try to disable the SlevomatCodingStandard\Sniffs\Functions\FunctionLengthSniff error but I can...
I have tried:
/**
* @phpcsSuppress SlevomatCodingStandard.Functions.FunctionLength
*
* @return array
*/
// phpcs:disable
public function keys(): array
{
return [
[
'key' => 'first',
'title' => __('forecast-version-v1.first'),
'description' => __('forecast-version-v1.first-description'),
'format' => 'float',
'list' => true,
],
...
[
'key' => 'last_first_percent_valid',
'title' => __('forecast-version-v1.last_first_percent_valid'),
'description' => __('forecast-version-v1.last_first_percent_valid-description'),
'format' => 'bool',
'list' => false,
],
];
}
// phpcs:enableBut I always get:
• [Architecture] Function length: (SlevomatCodingStandard\Sniffs\Functions\FunctionLengthSniff)
app/Domains/Forecast/Service/Version/V1/Values.php:52: Your function is too long. Currently using 100 lines. Can be up to 80 lines.
I get the same error for UnusedParameterSniff using all available ignore comments:
• [Code] Unused parameter: (SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff)
How can I ignore this errors?
Thanks!
johnbacon, piovezanfernando, NataMusic, LucaPipolo, webmasterMeyers and 3 more
Metadata
Metadata
Assignees
Labels
No labels