Showing 871 of 873 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    protected function init(): void
    {
        parent::init();

        $this->op->values = [
Severity: Major
Found in src/Table/Column/FilterModel/TypeDate.php and 1 other location - About 1 day to fix
src/Table/Column/FilterModel/TypeDatetime.php on lines 12..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 266.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    protected function init(): void
    {
        parent::init();

        $this->op->values = [
Severity: Major
Found in src/Table/Column/FilterModel/TypeDatetime.php and 1 other location - About 1 day to fix
src/Table/Column/FilterModel/TypeDate.php on lines 13..64

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 266.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

The class Console has 15 public methods. Consider refactoring Console to keep number of public methods under 10.
Open

class Console extends View implements \Psr\Log\LoggerInterface
{
    public $ui = 'inverted black segment';
    public $element = 'pre';

Severity: Minor
Found in src/Console.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

The class Context has 45 non-getter- and setter-methods. Consider refactoring Context to keep number of methods under 25.
Open

class Context extends RawMinkContext implements BehatContext
{
    /** @var string|null Temporary store button id when press. Used in js callback test. */
    protected $buttonId;

Severity: Minor
Found in src/Behat/Context.php by phpmd

Since: PHPMD 0.1

A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'. The default was changed from 10 to 25 in PHPMD 2.3.

Source: http://phpmd.org/rules/codesize.txt

The class CardDeck has an overall complexity of 67 which is very high. The configured complexity threshold is 50.
Open

class CardDeck extends View
{
    public $ui = '';

    /** @var string|View Card type inside this deck. */
Severity: Minor
Found in src/CardDeck.php by phpmd

Since: PHPMD 0.2.5

The Weighted Method Count (WMC) of a class is a good indicator of how much time and effort is required to modify and maintain this class. The WMC metric is defined as the sum of complexities of all methods declared in a class. A large number of methods also means that this class has a greater potential impact on derived classes.

Example:

class Foo {
      public function bar() {
          if ($a == $b)  {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      public function baz() {
          if ($a == $b) {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      // Several other complex methods
  }

Source: http://phpmd.org/rules/codesize.txt

The class Crud has an overall complexity of 54 which is very high. The configured complexity threshold is 50.
Open

class Crud extends Grid
{
    /** @var array of fields to display in Grid */
    public $displayFields;

Severity: Minor
Found in src/Crud.php by phpmd

Since: PHPMD 0.2.5

The Weighted Method Count (WMC) of a class is a good indicator of how much time and effort is required to modify and maintain this class. The WMC metric is defined as the sum of complexities of all methods declared in a class. A large number of methods also means that this class has a greater potential impact on derived classes.

Example:

class Foo {
      public function bar() {
          if ($a == $b)  {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      public function baz() {
          if ($a == $b) {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      // Several other complex methods
  }

Source: http://phpmd.org/rules/codesize.txt

The class Modal has 12 public methods. Consider refactoring Modal to keep number of public methods under 10.
Open

class Modal extends View
{
    public $defaultTemplate = 'modal.html';

    /** @var string|null Set null for no title */
Severity: Minor
Found in src/Modal.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

The class Context has 39 public methods. Consider refactoring Context to keep number of public methods under 10.
Open

class Context extends RawMinkContext implements BehatContext
{
    /** @var string|null Temporary store button id when press. Used in js callback test. */
    protected $buttonId;

Severity: Minor
Found in src/Behat/Context.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

The class Card has 12 public methods. Consider refactoring Card to keep number of public methods under 10.
Open

class Card extends View
{
    public $ui = 'card atk-card';

    public $defaultTemplate = 'card.html';
Severity: Minor
Found in src/Card.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

The class Context has an overall complexity of 77 which is very high. The configured complexity threshold is 50.
Open

class Context extends RawMinkContext implements BehatContext
{
    /** @var string|null Temporary store button id when press. Used in js callback test. */
    protected $buttonId;

Severity: Minor
Found in src/Behat/Context.php by phpmd

Since: PHPMD 0.2.5

The Weighted Method Count (WMC) of a class is a good indicator of how much time and effort is required to modify and maintain this class. The WMC metric is defined as the sum of complexities of all methods declared in a class. A large number of methods also means that this class has a greater potential impact on derived classes.

Example:

class Foo {
      public function bar() {
          if ($a == $b)  {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      public function baz() {
          if ($a == $b) {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      // Several other complex methods
  }

Source: http://phpmd.org/rules/codesize.txt

The class Table has 13 public methods. Consider refactoring Table to keep number of public methods under 10.
Open

class Table extends Lister
{
    // Overrides
    public $defaultTemplate = 'table.html';
    public $ui = 'table';
Severity: Minor
Found in src/Table.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

The class Card has an overall complexity of 56 which is very high. The configured complexity threshold is 50.
Open

class Card extends View
{
    public $ui = 'card atk-card';

    public $defaultTemplate = 'card.html';
Severity: Minor
Found in src/Card.php by phpmd

Since: PHPMD 0.2.5

The Weighted Method Count (WMC) of a class is a good indicator of how much time and effort is required to modify and maintain this class. The WMC metric is defined as the sum of complexities of all methods declared in a class. A large number of methods also means that this class has a greater potential impact on derived classes.

Example:

class Foo {
      public function bar() {
          if ($a == $b)  {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      public function baz() {
          if ($a == $b) {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      // Several other complex methods
  }

Source: http://phpmd.org/rules/codesize.txt

The class Table has an overall complexity of 108 which is very high. The configured complexity threshold is 50.
Open

class Table extends Lister
{
    // Overrides
    public $defaultTemplate = 'table.html';
    public $ui = 'table';
Severity: Minor
Found in src/Table.php by phpmd

Since: PHPMD 0.2.5

The Weighted Method Count (WMC) of a class is a good indicator of how much time and effort is required to modify and maintain this class. The WMC metric is defined as the sum of complexities of all methods declared in a class. A large number of methods also means that this class has a greater potential impact on derived classes.

Example:

class Foo {
      public function bar() {
          if ($a == $b)  {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      public function baz() {
          if ($a == $b) {
              if ($a1 == $b1) {
                  fiddle();
              } elseif ($a2 == $b2) {
                  fiddle();
              } else {
              }
          }
      }
      // Several other complex methods
  }

Source: http://phpmd.org/rules/codesize.txt

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                    if ($d2 >= $d1) {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d1);
                        $value2 = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
                    } else {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
Severity: Major
Found in src/Table/Column/FilterModel/TypeTime.php and 3 other locations - About 2 hrs to fix
src/Table/Column/FilterModel/TypeDate.php on lines 87..93
src/Table/Column/FilterModel/TypeDatetime.php on lines 86..92
src/Table/Column/FilterModel/TypeDatetime.php on lines 100..106

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                    if ($d2 >= $d1) {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d1);
                        $value2 = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
                    } else {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
Severity: Major
Found in src/Table/Column/FilterModel/TypeDate.php and 3 other locations - About 2 hrs to fix
src/Table/Column/FilterModel/TypeDatetime.php on lines 86..92
src/Table/Column/FilterModel/TypeDatetime.php on lines 100..106
src/Table/Column/FilterModel/TypeTime.php on lines 38..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                    if ($d2 >= $d1) {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d1);
                        $value2 = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
                    } else {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
Severity: Major
Found in src/Table/Column/FilterModel/TypeDatetime.php and 3 other locations - About 2 hrs to fix
src/Table/Column/FilterModel/TypeDate.php on lines 87..93
src/Table/Column/FilterModel/TypeDatetime.php on lines 100..106
src/Table/Column/FilterModel/TypeTime.php on lines 38..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                    if ($d2 >= $d1) {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d1);
                        $value2 = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
                    } else {
                        $value = $model->persistence->typecastSaveField($model->getField($filter['name']), $d2);
Severity: Major
Found in src/Table/Column/FilterModel/TypeDatetime.php and 3 other locations - About 2 hrs to fix
src/Table/Column/FilterModel/TypeDate.php on lines 87..93
src/Table/Column/FilterModel/TypeDatetime.php on lines 86..92
src/Table/Column/FilterModel/TypeTime.php on lines 38..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public $hasCollapsingCssActionColumn = true;
Severity: Minor
Found in src/Table.php by phpmd

Since: PHPMD 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 $argumentsList[] ) { // VIOLATION - Formal
          $otherReallyLongName = -5; // VIOLATION - Local
          for ($interestingIntIndex = 0; // VIOLATION - For
               $interestingIntIndex < 10;
               $interestingIntIndex++ ) {
          }
      }
  }

Source: http://phpmd.org/rules/naming.txt

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

    public $more_than_max_no_color = false;
Severity: Minor
Found in src/Table/Column/ColorRating.php by phpmd

Since: PHPMD 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 $argumentsList[] ) { // VIOLATION - Formal
          $otherReallyLongName = -5; // VIOLATION - Local
          for ($interestingIntIndex = 0; // VIOLATION - For
               $interestingIntIndex < 10;
               $interestingIntIndex++ ) {
          }
      }
  }

Source: http://phpmd.org/rules/naming.txt

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

    public $less_than_min_no_color = false;
Severity: Minor
Found in src/Table/Column/ColorRating.php by phpmd

Since: PHPMD 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 $argumentsList[] ) { // VIOLATION - Formal
          $otherReallyLongName = -5; // VIOLATION - Local
          for ($interestingIntIndex = 0; // VIOLATION - For
               $interestingIntIndex < 10;
               $interestingIntIndex++ ) {
          }
      }
  }

Source: http://phpmd.org/rules/naming.txt

Severity
Category
Status
Source
Language