autowp/autowp

View on GitHub
module/Application/test/PictureNameFormatterTest.php

Summary

Maintainability
D
2 days
Test Coverage

Method dataProvider has 402 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function dataProvider(): array
    {
        return [
            [
                [
Severity: Major
Found in module/Application/test/PictureNameFormatterTest.php - About 2 days to fix

    File PictureNameFormatterTest.php has 454 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace ApplicationTest;
    
    use Application\PictureNameFormatter;
    Severity: Minor
    Found in module/Application/test/PictureNameFormatterTest.php - About 6 hrs to fix

      The method dataProvider() has 405 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

          public function dataProvider(): array
          {
              return [
                  [
                      [

      syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
      Open

          protected string $applicationConfigPath = __DIR__ . '/../../../config/application.config.php';

      Avoid excessively long variable names like $applicationConfigPath. Keep variable name length under 20.
      Open

          protected string $applicationConfigPath = __DIR__ . '/../../../config/application.config.php';

      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++ ) {
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#longvariable

      There are no issues that match your filters.

      Category
      Status