module/Application/test/PictureNameFormatterTest.php
Method dataProvider
has 402 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function dataProvider(): array
{
return [
[
[
File PictureNameFormatterTest.php
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace ApplicationTest;
use Application\PictureNameFormatter;
The method dataProvider() has 405 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function dataProvider(): array
{
return [
[
[
- Exclude checks
syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open
Open
protected string $applicationConfigPath = __DIR__ . '/../../../config/application.config.php';
- Exclude checks
Avoid excessively long variable names like $applicationConfigPath. Keep variable name length under 20. Open
Open
protected string $applicationConfigPath = __DIR__ . '/../../../config/application.config.php';
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}