Function __buildPage
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
private function __buildPage($page)
{
$is_logged_in = static::isLoggedIn();
if (empty($page) || is_null($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 getPageCallback
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function getPageCallback($page = null)
{
if (!$page && $this->_callback) {
return $this->_callback;
} elseif (!$page && !$this->_callback) {
- 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 getPageCallback
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPageCallback($page = null)
{
if (!$page && $this->_callback) {
return $this->_callback;
} elseif (!$page && !$this->_callback) {
Method __buildPage
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function __buildPage($page)
{
$is_logged_in = static::isLoggedIn();
if (empty($page) || is_null($page)) {
File class.administration.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package core
*/
Function checkExtensionsForUpdates
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function checkExtensionsForUpdates()
{
$extensions = Symphony::ExtensionManager()->listInstalledHandles();
if (is_array($extensions) && !empty($extensions)) {
- 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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $callback;