steeffeen/FancyManiaLinks

View on GitHub

Showing 2,233 of 2,233 total issues

Label has 52 functions (exceeds 20 allowed). Consider refactoring.
Open

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

    /**
     * @var string $text Text
Severity: Major
Found in FML/Controls/Label.php - About 7 hrs to fix

    TMUIProperties has 51 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TMUIProperties extends UIProperties
    {
    
        /**
         * @var array $liveInfoProperties Live info properties
    Severity: Major
    Found in FML/XmlRpc/TMUIProperties.php - About 7 hrs to fix

      File Control.php has 420 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace FML\Controls;
      
      use FML\Script\Features\ActionTrigger;
      Severity: Minor
      Found in FML/Controls/Control.php - About 6 hrs to fix

        File Quad.php has 366 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace FML\Controls;
        
        use FML\Components\CheckBoxDesign;
        Severity: Minor
        Found in FML/Controls/Quad.php - About 4 hrs to fix

          Style has 36 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Style implements BackgroundColorable, BgColorable, Colorable, Renderable, Styleable, SubStyleable, TextFormatable
          {
          
              /**
               * @var string[] $styleIds Style Ids
          Severity: Minor
          Found in FML/Stylesheet/Style.php - About 4 hrs to fix

            TextEdit has 35 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class TextEdit extends Control implements MultiLineable, Scriptable, Styleable, TextFormatable
            {
            
                /*
                 * Constants
            Severity: Minor
            Found in FML/Controls/TextEdit.php - About 4 hrs to fix

              ManiaLink has 35 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class ManiaLink
              {
              
                  /*
                   * Constants
              Severity: Minor
              Found in FML/ManiaLink.php - About 4 hrs to fix

                Entry has 34 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable
                {
                
                    /*
                     * Constants
                Severity: Minor
                Found in FML/Controls/Entry.php - About 4 hrs to fix

                  File Label.php has 346 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  namespace FML\Controls;
                  
                  use FML\Script\Features\Clock;
                  Severity: Minor
                  Found in FML/Controls/Label.php - About 4 hrs to fix

                    UIProperties has 32 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class UIProperties
                    {
                    
                        /**
                         * @var array $chatProperties Chat properties
                    Severity: Minor
                    Found in FML/XmlRpc/UIProperties.php - About 4 hrs to fix

                      Mood has 32 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Mood
                      {
                      
                          /**
                           * @var string $lightAmbientColor Light ambient color
                      Severity: Minor
                      Found in FML/Stylesheet/Mood.php - About 4 hrs to fix

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                        <?php
                        
                        namespace FML\ManiaCode;
                        
                        /**
                        Severity: Major
                        Found in FML/ManiaCode/AddBuddy.php and 2 other locations - About 3 hrs to fix
                        FML/ManiaCode/Go_To.php on lines 1..82
                        FML/ManiaCode/ShowMessage.php on lines 1..82

                        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 156.

                        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

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                        <?php
                        
                        namespace FML\ManiaCode;
                        
                        /**
                        Severity: Major
                        Found in FML/ManiaCode/Go_To.php and 2 other locations - About 3 hrs to fix
                        FML/ManiaCode/AddBuddy.php on lines 1..82
                        FML/ManiaCode/ShowMessage.php on lines 1..82

                        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 156.

                        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

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                        <?php
                        
                        namespace FML\ManiaCode;
                        
                        /**
                        Severity: Major
                        Found in FML/ManiaCode/ShowMessage.php and 2 other locations - About 3 hrs to fix
                        FML/ManiaCode/AddBuddy.php on lines 1..82
                        FML/ManiaCode/Go_To.php on lines 1..82

                        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 156.

                        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

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

                            public function render(\DOMDocument $domDocument)
                            {
                                $domElement = parent::render($domDocument);
                                if ($this->text) {
                                    $domElement->setAttribute("text", $this->text);
                        Severity: Minor
                        Found in FML/Controls/Label.php - About 3 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

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

                            public function render(\DOMDocument $domDocument)
                            {
                                $domElement = parent::render($domDocument);
                                if ($this->imageUrl) {
                                    $domElement->setAttribute("image", $this->imageUrl);
                        Severity: Minor
                        Found in FML/Controls/Quad.php - About 3 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

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

                        <?php
                        
                        namespace FML\Elements;
                        
                        use FML\Types\Renderable;
                        Severity: Major
                        Found in FML/Elements/Including.php and 1 other location - About 3 hrs to fix
                        FML/Elements/Music.php on lines 1..83

                        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 150.

                        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

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

                        <?php
                        
                        namespace FML\Elements;
                        
                        use FML\Types\Renderable;
                        Severity: Major
                        Found in FML/Elements/Music.php and 1 other location - About 3 hrs to fix
                        FML/Elements/Including.php on lines 1..83

                        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 150.

                        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 Script has 12 public methods. Consider refactoring Script to keep number of public methods under 10.
                        Open

                        class Script
                        {
                        
                            /*
                             * Constants
                        Severity: Minor
                        Found in FML/Script/Script.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 Control has 29 non-getter- and setter-methods. Consider refactoring Control to keep number of methods under 25.
                        Open

                        abstract class Control implements Identifiable, Renderable, ScriptFeatureable
                        {
                        
                            /*
                             * Constants
                        Severity: Minor
                        Found in FML/Controls/Control.php by phpmd

                        TooManyMethods

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

                        Example

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

                        Severity
                        Category
                        Status
                        Source
                        Language