Showing 3,247 of 4,218 total issues

Function _debug_auth_check has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function _debug_auth_check($users = [])
{
    $auth_user = trim($_SERVER['PHP_AUTH_USER']);
    $auth_pswd = trim($_SERVER['PHP_AUTH_PW']);
    if ( ! strlen($auth_user) || ! strlen($auth_pswd)) {
Severity: Minor
Found in functions/yf_debug.php - About 25 mins to fix

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 array_dot has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function array_dot($array, $prepend = '')
    {
        $results = [];
        foreach ($array as $key => $value) {
            if (is_array($value)) {
Severity: Minor
Found in functions/yf_array_funcs.php - About 25 mins to fix

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 _htmlchars has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function _htmlchars($str = '')
    {
        if (is_array($str)) {
            foreach ((array) $str as $k => $v) {
                $str[$k] = _htmlchars($v);
Severity: Minor
Found in functions/yf_common_funcs.php - About 25 mins to fix

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 array_pluck has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function array_pluck($array, $value, $key = null)
    {
        $results = [];
        foreach ($array as $item) {
            $itemValue = is_object($item) ? $item->{$value} : $item[$value];
Severity: Minor
Found in functions/yf_array_funcs.php - About 25 mins to fix

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 obj2arr has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function obj2arr(&$obj)
    {
        $obj = (array) $obj;
        foreach ($obj as &$v) {
            if (is_array($v)) {
Severity: Minor
Found in functions/yf_common_funcs.php - About 25 mins to fix

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 array_forget has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function array_forget(&$array, $key)
    {
        $keys = explode('.', $key);
        while (count((array) $keys) > 1) {
            $key = array_shift($keys);
Severity: Minor
Found in functions/yf_array_funcs.php - About 25 mins to fix

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 __call has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function __call($name, $arguments)
        {
            if ( ! $this->_silent) {
                trigger_error($this->_o_name . '(): missing object method: ' . $name . ($this->_c_name ? ' for class: ' . $this->_c_name : ''), E_USER_WARNING);
                if (function_exists('trace') && function_exists('is_console') && is_console()) {
Severity: Minor
Found in functions/yf_aliases.php - About 25 mins to fix

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

Severity
Category
Status
Source
Language