Showing 65 of 65 total issues
Function rewrite
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function rewrite(string $url): array
{
$router = [];
//Valor por defecto
if ($url === '/') {
- 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 models
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function models($model)
{
$args = is_array($model) ? $model : func_get_args();
foreach ($args as $model) {
$Model = Util::camelcase(basename($model));
- 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 createSecureRSAKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function createSecureRSAKey($kumbia = true)
{
$config = Config::read('config');
if ($config->kumbia->secure_ajax) {
if ($_SESSION['rsa_key']) {
- 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 identify
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function identify($login = '', $pass = '', $mode = '') {
if ($this->isValid()) {
return TRUE;
} else {
// check
- 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 _toBytes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _toBytes($size) {
if (is_int($size) || ctype_digit($size)) {
return (int) $size;
}
- 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"