Showing 46 of 46 total issues
Function info_actions
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function info_actions($actions, $depths = array(), $endslashs = array())
{
$result = '';
if (!isset($depths[''])) {
$depths[''] = '<code>ERROR</code>'; // homepage
- 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 info_actions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function info_actions($actions, $depths = array(), $endslashs = array())
{
$result = '';
if (!isset($depths[''])) {
$depths[''] = '<code>ERROR</code>'; // homepage
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class BaseTest extends PHPUnit\Framework\TestCase
- Exclude checks
Function info_array
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
function info_array($array, $keyed = false)
{
if (!is_array($array)) {
return '<code>ERROR</code>';
}
- 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
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 86 and the first side effect is on line 6. Open
Open
<?php
- Exclude checks
Variable $this
is undeclared Open
Open
$info['Attogram Directory'] = info_dir($this->attogramDirectory);
- Exclude checks
Variable $this
is undeclared Open
Open
$info['templates'] = info_array($this->templates, true);
- Exclude checks
Variable $this
is undeclared Open
Open
$this
- Exclude checks
Variable $this
is undeclared Open
Open
$this->attogramDirectory.'LICENSE.md',
- Exclude checks
Variable $this
is undeclared Open
Open
$info['log'] = info_object($this->log);
- Exclude checks
Variable $this
is undeclared Open
Open
$info['db'] = info_object($this->database);
- Exclude checks
Possibly zero references to use statement for classlike/namespace TestCase
(\PHPUnit\Framework\TestCase)
Open
Open
use PHPUnit\Framework\TestCase;
- Exclude checks
Class extends undeclared class \PHPUnit\Framework\TestCase
Open
Open
class BaseTest extends PHPUnit\Framework\TestCase
- Exclude checks
TODO found Open
Open
# TODO: [Attogram Framework Info Module](https://github.com/attogram/attogram-info)
- Exclude checks
Variable $this
is undeclared Open
Open
$info['config'] = info_array($this->config, true);
- Exclude checks
Variable $this
is undeclared Open
Open
$this->attogramDirectory.'README.md',
- Exclude checks
Variable $this
is undeclared Open
Open
$info['actions'] = info_actions($this->actions, $this->depth, $this->noEndSlash);
- Exclude checks
Variable $this
is undeclared Open
Open
$info['skip_files'] = info_array($this->getSkipFiles());
- Exclude checks
Variable $this
is undeclared Open
Open
$info['event'] = info_object($this->event);
- Exclude checks
Variable $this
is undeclared Open
Open
$info['request'] = info_object($this->request);
- Exclude checks