Showing 84 of 241 total issues
Method loadRewrites
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadRewrites()
{
if ($this->_rewrites === null) {
$files = ['config.xml', 'development.xml'];
$prototype = $this->_rewriteTypes;
Function getLogGroups
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getLogGroups()
{
if ($this->logGroups === null) {
$logGroups = [
'deprecation' => [],
- 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 computeErrorsCount
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function computeErrorsCount()
{
$logger = $this->getLogger();
$count = [
'total_log_count' => count($logger->getLogs()),
- 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 readLineFromFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function readLineFromFile($file)
{
$line = '';
$position = ftell($file);
- 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
Method searchAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function searchAction()
{
/** @var Mage_Core_Controller_Request_Http$request */
$request = $this->getRequest();
Method panelAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function panelAction()
{
$profiler = $this->getProfiler();
/** @var Mage_Core_Controller_Request_Http $request */
Method collect
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function collect(
Mage_Core_Controller_Request_Http $request,
Mage_Core_Controller_Response_Http $response,
\Exception $exception = null
)
Method searchResultsAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function searchResultsAction()
{
/** @var Mage_Core_Controller_Request_Http$request */
$request = $this->getRequest();
/** @var Ecocode_Profiler_Model_Profiler $profiler */
Method collectSessionData
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function collectSessionData()
{
$namespaceData = [];
$storeData = [];
$rawSessionData = $this->getRawSession();
Method getRequestJsonData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRequestJsonData()
{
$eventList = $this->getCollector()->getEvents();
$events = [];
foreach ($eventList as $name => $event) {
Method collectCacheCallData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function collectCacheCallData()
{
$cache = $this->getCacheInstance();
if (!$cache instanceof Ecocode_Profiler_Model_Core_Cache) {
return;
Method renderNode
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function renderNode($node, $prefix = '', $sibling = false)
{
if (!$node['parent_id']) {
$start = $node['name'];
} else {
Function captureFlashMessages
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function captureFlashMessages()
{
$messages = [];
foreach ($this->getRawSession() as $namespace => $data) {
if (!isset($data['messages'])) {
- 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 collect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function collect(
Mage_Core_Controller_Request_Http $request,
Mage_Core_Controller_Response_Http $response,
\Exception $exception = null
)
- 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 getRewriteConflicts
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getRewriteConflicts()
{
$conflicts = [];
$rewrites = $this->loadRewrites();
foreach ($rewrites as $type => $data) {
- 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
Method computeErrorsCount
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function computeErrorsCount()
{
$logger = $this->getLogger();
$count = [
'total_log_count' => count($logger->getLogs()),
Method prepareQueryData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepareQueryData()
{
$this->queries = [];
$this->identicalQueries = [];
$this->queriesByContext = [];
Method formatQuery
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function formatQuery($sql, $highlightOnly = false)
{
if (@!class_exists('SqlFormatter')) {
return 'SqlFormatter is not installed';
}
Method parseController
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseController($controller)
{
if (is_object($controller)) {
/** @var Mage_Core_Controller_Varien_Front $controller */
Function getClassNames
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function getClassNames($reload = false)
{
if ($this->classNameCache !== null && $reload === false) {
return $this->classNameCache;
}
- 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"