Showing 284 of 284 total issues
Avoid excessively long variable names like $corporationActiveArea. Keep variable name length under 20. Open
Open
$corporationActiveArea = @$stats["corporationActiveArea"];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 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 $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $corporationActiveArea. Keep variable name length under 20. Open
Open
$corporationActiveArea = @$stats["corporationActiveArea"];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 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 $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
The class Sovereign has 17 fields. Consider redesigning Sovereign to keep the number of fields under 15. Open
Open
class Sovereign
{
/**
* @var WebSocket
*/
- 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
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket