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
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Exclude checks
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
- Exclude checks
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
- Exclude checks
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
- Exclude checks
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
- Exclude checks
The class ManiaLink has 11 public methods. Consider refactoring ManiaLink to keep number of public methods under 10. Open
class ManiaLink
{
/*
* Constants
- Read upRead up
- Exclude checks
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
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Exclude checks
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
- Exclude checks
File ManiaLink.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace FML;
use FML\Elements\Dico;
Paging
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Paging extends ScriptFeature
{
/*
* Constants
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);
Style3d
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Style3d
{
/*
* Constants
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);
Method prepare
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepare(Script $script)
{
if (empty($this->pages)) {
return $this;
}
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);
- Read upRead up
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