File class.frontendpage.php
has 467 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package toolkit
*/
Function __buildPage
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
private function __buildPage()
{
$start = precision_timer();
if (!$page = $this->resolvePage()) {
- 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 __buildPage
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function __buildPage()
{
$start = precision_timer();
if (!$page = $this->resolvePage()) {
Function resolvePage
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function resolvePage($page = null)
{
if ($page) {
$this->_page = $page;
}
- 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 generate
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function generate($page = null)
{
$full_generate = true;
$devkit = null;
$output = 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
Method generate
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate($page = null)
{
$full_generate = true;
$devkit = null;
$output = null;
Function processDatasources
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function processDatasources($datasources, XMLElement &$wrapper, array $params = array())
{
if (trim($datasources) == '') {
return;
}
- 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 resolvePage
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resolvePage($page = null)
{
if ($page) {
$this->_page = $page;
}
Method processDatasources
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processDatasources($datasources, XMLElement &$wrapper, array $params = array())
{
if (trim($datasources) == '') {
return;
}
Function processEvents
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function processEvents($events, XMLElement &$wrapper)
{
/**
* Manipulate the events array and event element wrapper
* @delegate FrontendProcessEvents
- 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 __findDatasourceOrder
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function __findDatasourceOrder($dependenciesList)
{
if (!is_array($dependenciesList) || empty($dependenciesList)) {
return;
}
- 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 processEvents
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processEvents($events, XMLElement &$wrapper)
{
/**
* Manipulate the events array and event element wrapper
* @delegate FrontendProcessEvents
Method __findDatasourceOrder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function __findDatasourceOrder($dependenciesList)
{
if (!is_array($dependenciesList) || empty($dependenciesList)) {
return;
}