Showing 241 of 241 total issues
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_DataCollectorInterface. Keep class name length under 40. Open
interface Ecocode_Profiler_Model_Collector_DataCollectorInterface
{
public function init();
/**
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Block_Collector_Request_Toolbar. Keep class name length under 40. Open
class Ecocode_Profiler_Block_Collector_Request_Toolbar
extends Ecocode_Profiler_Block_Collector_Base
{
public function renderHandler($controller, $route = false, $method = false)
{
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Block_Renderer_Log_LogTable. Keep class name length under 40. Open
class Ecocode_Profiler_Block_Renderer_Log_LogTable
extends Ecocode_Profiler_Block_Renderer_AbstractRenderer
{
public function _construct()
{
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_LateDataCollectorInterface. Keep class name length under 40. Open
interface Ecocode_Profiler_Model_Collector_LateDataCollectorInterface
{
/**
* Collects data as late as possible.
*/
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_ModelDataCollector. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Collector_ModelDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
{
CONST LOAD_CALL_THRESHOLD = 20;
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Block_Collector_Time_Panel. Keep class name length under 40. Open
class Ecocode_Profiler_Block_Collector_Time_Panel
extends Ecocode_Profiler_Block_Collector_Base
{
public function getRequestJsonData()
{
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_TimeDataCollector. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Collector_TimeDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
implements Ecocode_Profiler_Model_Collector_LateDataCollectorInterface
{
public function isVarienProfiler()
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_RewriteDataCollector. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Collector_RewriteDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
{
/**
* @codeCoverageIgnore
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Block_Collector_Log_Panel. Keep class name length under 40. Open
class Ecocode_Profiler_Block_Collector_Log_Panel
extends Ecocode_Profiler_Block_Collector_Base
{
protected $logTableRenderer;
protected $logGroups;
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_ConfigDataCollector. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Collector_ConfigDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
{
/** @var Ecocode_Profiler_Helper_Data */
protected $helper;
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Http_ResponseHeaderBag. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Http_ResponseHeaderBag
extends Ecocode_Profiler_Model_Http_HeaderBag
{
const COOKIES_FLAT = 'flat';
const COOKIES_ARRAY = 'array';
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Profiler_FileStorage. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Profiler_FileStorage
implements Ecocode_Profiler_Model_Profiler_StorageInterface
{
/**
* Folder where profiler data are stored.
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Profiler_StorageInterface. Keep class name length under 40. Open
interface Ecocode_Profiler_Model_Profiler_StorageInterface
{
/**
* Finds profiler tokens for the given criteria.
*
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long variable names like $configClassReflection. Keep variable name length under 20. Open
protected $configClassReflection;
- Read upRead up
- 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 $formattedQueriesCache. Keep variable name length under 20. Open
protected $formattedQueriesCache = [];
- Read upRead up
- 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 class names like Ecocode_Profiler_Model_Collector_TranslationDataCollector. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Collector_TranslationDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
{
protected $_currentBlock;
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Logger_DebugHandler. Keep class name length under 40. Open
class Ecocode_Profiler_Model_Logger_DebugHandler extends TestHandler
implements Ecocode_Profiler_Model_Logger_DebugHandlerInterface
{
/**
* {@inheritdoc}
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Avoid excessively long class names like Ecocode_Profiler_Model_Logger_DebugHandlerInterface. Keep class name length under 40. Open
interface Ecocode_Profiler_Model_Logger_DebugHandlerInterface
{
/**
* Returns an array of logs.
*
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
Function renderNode
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function renderNode($node, $prefix = '', $sibling = false)
{
if (!$node['parent_id']) {
$start = $node['name'];
} else {
- 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
Function collectSessionData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function collectSessionData()
{
$namespaceData = [];
$storeData = [];
$rawSessionData = $this->getRawSession();
- 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"