Showing 127 of 140 total issues
Function setUpElement
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function setUpElement()
{
parent::setUpElement();
$path = "/";
if(isset($_SERVER["HTTP_REFERER"]) && ($url = parse_url($_SERVER["HTTP_REFERER"])) &&
- Read upRead up
- Create a ticketCreate a ticket
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 parseDecoded
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseDecoded($obj){
if(!is_array($obj)){
return $obj;
}
- Create a ticketCreate a ticket
Function userLogin
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function userLogin()
{
return function (UserLibrary $instance, $username, $password) {
if (($user = $instance->getUser($username)) == null && $this->validMail($username)) {
- Read upRead up
- Create a ticketCreate a ticket
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 internalHandleProgram
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function internalHandleProgram(Program $input)
{
$result = null;
if ($input instanceof CompositeFunction) {
- Read upRead up
- Create a ticketCreate a ticket
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 __construct
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(BackendSingletonContainer $container, Page $page, $id = "")
{
$connection = $container->getDBInstance()->getConnection();
$this->container = $container;
$this->page = $page;
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function handle(array $types, JSONFunction $function, $instance = null, $generatedHandler = null)
{
foreach ($types as $type) {
if ($generatedHandler instanceof TypeHandler) {
- Read upRead up
- Create a ticketCreate a ticket
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 __get
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function __get($name)
{
$name = strtolower($name);
switch ($name) {
case 'site':
- Read upRead up
- Create a ticketCreate a ticket
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 expectProgram
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function expectProgram()
{
$t = $this->expectType();
$fc = $cf = null;
if ($this->look_ahead == Lexer::T_L_BRACKET || ($this->look_ahead == Lexer::T_DOT && $this->look_ahead_2 != Lexer::T_DOT && $this->look_ahead_2 != Lexer::T_L_BRACKET)) {
- Read upRead up
- Create a ticketCreate a ticket
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 __get
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __get($name)
{
$name = strtolower($name);
switch ($name) {
case 'site':
- Create a ticketCreate a ticket
Method setUpElement
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setUpElement()
{
parent::setUpElement();
$path = "/";
if(isset($_SERVER["HTTP_REFERER"]) && ($url = parse_url($_SERVER["HTTP_REFERER"])) &&
- Create a ticketCreate a ticket
Function getPageElement
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getPageElement($name, $cached = true)
{
if($cached && isset($this->cache[$name])){
return $this->cache[$name];
}
- Read upRead up
- Create a ticketCreate a ticket
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 detectLoop
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function detectLoop($childID, $parentID)
{
$prevID = $parentID;
$loopDetected = false;
- Read upRead up
- Create a ticketCreate a ticket
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 listLog
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function listLog($level = null, $time = 0)
{
if(!$this->exists()){
return array();
}
- Read upRead up
- Create a ticketCreate a ticket
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 listFolder
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function listFolder($listType = Folder::LIST_FOLDER_ALL)
{
$dir = @scandir($this->folderPath);
if ($dir === false) {
return false;
- Read upRead up
- Create a ticketCreate a ticket
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 fileFromScaleMethod
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function fileFromScaleMethod(ImageFile $file, $scaleArray)
{
if (!is_array($scaleArray) || !isset($scaleArray["height"], $scaleArray["width"], $scaleArray["scaleMethod"], $scaleArray["dataURI"])) {
return null;
- Create a ticketCreate a ticket
Function setUp
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function setUp(Server $server, $type)
{
if (in_array($type, $this->hasBeenSetUp)) {
return;
- Read upRead up
- Create a ticketCreate a ticket
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 handle
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function handle($type, JSONFunction $function, $instance = null)
{
if (isset($this->alias[$type])) {
foreach ($this->alias[$type] as $target) {
if (!$this->canHandle($target, $function, $instance)) {
- Read upRead up
- Create a ticketCreate a ticket
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 fileFromScaleMethod
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function fileFromScaleMethod(ImageFile $file, $scaleArray)
{
if (!is_array($scaleArray) || !isset($scaleArray["height"], $scaleArray["width"], $scaleArray["scaleMethod"], $scaleArray["dataURI"])) {
return null;
- Read upRead up
- Create a ticketCreate a ticket
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 registerHandlersFromConfig
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function registerHandlersFromConfig()
{
$config = $this->container->getConfigInstance();
foreach ($config->getAJAXTypeHandlers() as $handlerArray) {
- Read upRead up
- Create a ticketCreate a ticket
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 __construct
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function __construct(BackendSingletonContainer $container, User $user)
{
$this->container = $container;
parent::__construct($user, 'User');
- Create a ticketCreate a ticket