Showing 235 of 1,765 total issues
The class View has an overall complexity of 152 which is very high. The configured complexity threshold is 50. Open
class View extends AbstractView
{
/**
* When you call renderAll() this will be populated with JavaScript chains.
*
- Create a ticketCreate a ticket
- Exclude checks
The class HtmlTemplate has 17 public methods. Consider refactoring HtmlTemplate to keep number of public methods under 10. Open
class HtmlTemplate
{
use WarnDynamicPropertyTrait;
public const TOP_TAG = '_top';
- Read upRead up
- Create a ticketCreate a ticket
- 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 App has 26 fields. Consider redesigning App to keep the number of fields under 15. Open
class App
{
use AppScopeTrait;
use DiContainerTrait;
use DynamicMethodTrait;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Multiline has 18 fields. Consider redesigning Multiline to keep the number of fields under 15. Open
class Multiline extends Form\Control
{
/** @var HtmlTemplate|null The template needed for the multiline view. */
public $multiLineTemplate;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class CardDeck has 23 fields. Consider redesigning CardDeck to keep the number of fields under 15. Open
class CardDeck extends View
{
public $ui = 'basic segment atk-card-deck';
public $defaultTemplate = 'card-deck.html';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
Function applyMemberDec
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
function applyMemberDec(e, t, r, a, n, i, s, o, c, l, u) {
- Create a ticketCreate a ticket
Function memberDec
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
function memberDec(e, t, r, a, n, i, s, o, c, l, u) {
- Create a ticketCreate a ticket
The class App has 56 public methods and attributes. Consider reducing the number of public items to less than 45. Open
class App
{
use AppScopeTrait;
use DiContainerTrait;
use DynamicMethodTrait;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ExcessivePublicCount
Since: 0.1
A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.
Example
public class Foo {
public $value;
public $something;
public $var;
// [... more more public attributes ...]
public function doWork() {}
public function doMoreWork() {}
public function doWorkAgain() {}
// [... more more public methods ...]
}
Source https://phpmd.org/rules/codesize.html#excessivepubliccount
The class Context has 49 public methods and attributes. Consider reducing the number of public items to less than 45. Open
class Context extends RawMinkContext implements BehatContext
{
use JsCoverageContextTrait;
use RwDemosContextTrait;
use WarnDynamicPropertyTrait;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ExcessivePublicCount
Since: 0.1
A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.
Example
public class Foo {
public $value;
public $something;
public $var;
// [... more more public attributes ...]
public function doWork() {}
public function doMoreWork() {}
public function doWorkAgain() {}
// [... more more public methods ...]
}
Source https://phpmd.org/rules/codesize.html#excessivepubliccount
The class View has 46 public methods and attributes. Consider reducing the number of public items to less than 45. Open
class View extends AbstractView
{
/**
* When you call renderAll() this will be populated with JavaScript chains.
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ExcessivePublicCount
Since: 0.1
A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.
Example
public class Foo {
public $value;
public $something;
public $var;
// [... more more public attributes ...]
public function doWork() {}
public function doMoreWork() {}
public function doWorkAgain() {}
// [... more more public methods ...]
}
Source https://phpmd.org/rules/codesize.html#excessivepubliccount
Function access
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- Create a ticketCreate a ticket
Function render
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function render(_ctx, _cache, $props, $setup, $data, $options) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( matchedSelectors[ sel ] ) {
matchedHandlers.push( handleObj );
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( newContext != context || !support.scope ) {
// Capture the context ID, setting it first if necessary
if ( ( nid = context.getAttribute( "id" ) ) ) {
nid = jQuery.escapeSelector( nid );
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ( Expr.relative[ tokens[ j ].type ] ) {
break;
}
- Create a ticketCreate a ticket
Function render
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function render(_ctx, _cache, $props, $setup, $data, $options) {
- Create a ticketCreate a ticket
Method addModal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addModal($button, $defaults, \Closure $callback, $owner = null, $args = [], $isDisabled = false)
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
while (wrapper.firstChild)
wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for ( match in context ) {
// Properties of context are called as methods if possible
if ( isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
- Create a ticketCreate a ticket