Showing 36 of 36 total issues
Function authenticateToken
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function authenticateToken($token)
{
if ($this->noLogin) {
return true;
}
- 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 getRequest
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function getRequest()
{
$error = null;
do {
- 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 getPanel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPanel()
{
ob_start();
phpinfo();
$phpInfo = ob_get_contents();
Method getTab
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTab()
{
$this->icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" version="1.1" width="16px" '.
'height="16px"><path fill="#043CBF" d="m221.25 479.1c-79.88-6.85-150.37-51.83-189.99-121.24-14.666-'.
'25.69-23.972-53.8-29.552-89.27-0.70825-4.5-1.1632-16.11-1.1384-29.06 0.04489-23.34 1.5027-35.94 6.5464'.
Method getMetaData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getMetaData()
{
if (empty($this->metaData)) {
$this->metaData[self::META_TIME_LINE] = [];
$this->metaData[self::META_MEMORY_PEAK] = 0;
Function authenticateUser
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function authenticateUser($user, $password)
{
$user = trim((string) $user);
$password = trim((string) $password);
- 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 finish
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function finish($labelOrFormat = null, $args = null)
{
if (static::$enabled) {
$now = microtime(true);
Method getRequest
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getRequest()
{
$error = null;
do {
Method processCall
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processCall(\stdClass $call)
{
$id = property_exists($call, 'id') ? $call->id : null;
$params = property_exists($call, 'params') ? $call->params : [];
$result = null;
Function cd
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function cd($token, $environment, $path)
{
$result = $this->initialize($token, $environment);
if ($result) {
return $result;
- 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 setEnvironment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function setEnvironment($environment)
{
$environment = !empty($environment) ? (array) $environment : [];
$path = (isset($environment['path']) && !$this->isEmptyString($environment['path'])) ?
$environment['path'] : $this->homeDirectory;
- 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 __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(Container $c = null, $containerName = '')
{
if ($c === null || !$c->has($containerName)) {
return 0;
}
- 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 finish
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function finish($labelOrFormat = null, $args = null)
{
if (static::$enabled) {
$now = microtime(true);
- 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 getMetaData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getMetaData()
{
if (empty($this->metaData)) {
$this->metaData[self::META_TIME_LINE] = [];
$this->metaData[self::META_MEMORY_PEAK] = 0;
- 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 parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function parse($data)
{
$return = $this->getHeader();
$time = $cnt = 0;
foreach ($data as $var) {
- 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 processCall
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function processCall(\stdClass $call)
{
$id = property_exists($call, 'id') ? $call->id : null;
$params = property_exists($call, 'params') ? $call->params : [];
$result = 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"