steeffeen/FancyManiaLinks

View on GitHub

Showing 2,233 of 2,233 total issues

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

class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable
{

    /*
     * Constants
Severity: Minor
Found in FML/Controls/Entry.php by phpmd

The class Control has 29 public methods. Consider refactoring Control to keep number of public methods under 10.
Open

abstract class Control implements Identifiable, Renderable, ScriptFeatureable
{

    /*
     * Constants
Severity: Minor
Found in FML/Controls/Control.php by phpmd

TooManyPublicMethods

Since: 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'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

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

class Style implements BackgroundColorable, BgColorable, Colorable, Renderable, Styleable, SubStyleable, TextFormatable
{

    /**
     * @var string[] $styleIds Style Ids
Severity: Minor
Found in FML/Stylesheet/Style.php by phpmd

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

class Label extends Control implements Actionable, Linkable, NewLineable, MultiLineable, Scriptable, Styleable, TextFormatable
{

    /**
     * @var string $text Text
Severity: Minor
Found in FML/Controls/Label.php by phpmd

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

abstract class Control implements Identifiable, Renderable, ScriptFeatureable
{

    /*
     * Constants
Severity: Minor
Found in FML/Controls/Control.php by phpmd

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

class Quad extends Control implements Actionable, BackgroundColorable, BgColorable, Imageable, Linkable, Scriptable, Styleable, SubStyleable
{

    /*
     * Constants
Severity: Minor
Found in FML/Controls/Quad.php by phpmd

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

class TMUIProperties extends UIProperties
{

    /**
     * @var array $liveInfoProperties Live info properties
Severity: Minor
Found in FML/XmlRpc/TMUIProperties.php by phpmd

The class ManiaLink has 11 public methods. Consider refactoring ManiaLink to keep number of public methods under 10.
Open

class ManiaLink
{

    /*
     * Constants
Severity: Minor
Found in FML/ManiaLink.php by phpmd

TooManyPublicMethods

Since: 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'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

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

class Paging extends ScriptFeature
{

    /*
     * Constants
Severity: Minor
Found in FML/Script/Features/Paging.php by phpmd

The class ManiaCode has 22 public methods. Consider refactoring ManiaCode to keep number of public methods under 10.
Open

class ManiaCode
{

    /**
     * @var bool $disableConfirmation Disable the confirmation
Severity: Minor
Found in FML/ManiaCode.php by phpmd

TooManyPublicMethods

Since: 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'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

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

class ManiaLink
{

    /*
     * Constants
Severity: Minor
Found in FML/ManiaLink.php by phpmd

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

class TextEdit extends Control implements MultiLineable, Scriptable, Styleable, TextFormatable
{

    /*
     * Constants
Severity: Minor
Found in FML/Controls/TextEdit.php by phpmd

File ManiaLink.php has 300 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace FML;

use FML\Elements\Dico;
Severity: Minor
Found in FML/ManiaLink.php - About 3 hrs to fix

    Paging has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Paging extends ScriptFeature
    {
    
        /*
         * Constants
    Severity: Minor
    Found in FML/Script/Features/Paging.php - About 3 hrs to fix

      Method render has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function render(\DOMDocument $domDocument)
          {
              $domElement = parent::render($domDocument);
              if ($this->text) {
                  $domElement->setAttribute("text", $this->text);
      Severity: Major
      Found in FML/Controls/Label.php - About 3 hrs to fix

        Style3d has 26 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Style3d
        {
        
            /*
             * Constants
        Severity: Minor
        Found in FML/Stylesheet/Style3d.php - About 3 hrs to fix

          Method render has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function render(\DOMDocument $domDocument)
              {
                  $domElement = parent::render($domDocument);
                  if ($this->imageUrl) {
                      $domElement->setAttribute("image", $this->imageUrl);
          Severity: Major
          Found in FML/Controls/Quad.php - About 3 hrs to fix

            Method prepare has 73 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function prepare(Script $script)
                {
                    if (empty($this->pages)) {
                        return $this;
                    }
            Severity: Major
            Found in FML/Script/Features/Paging.php - About 2 hrs to fix

              Function render has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function render(\DOMDocument $domDocument)
                  {
                      $domElement = parent::render($domDocument);
                      if ($this->name) {
                          $domElement->setAttribute("name", $this->name);
              Severity: Minor
              Found in FML/Controls/Entry.php - About 2 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              ManiaCode has 25 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class ManiaCode
              {
              
                  /**
                   * @var bool $disableConfirmation Disable the confirmation
              Severity: Minor
              Found in FML/ManiaCode.php - About 2 hrs to fix
                Severity
                Category
                Status
                Source
                Language