Asymptix/Framework

View on GitHub

Showing 720 of 720 total issues

The method unsetValueWithComplexName() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
Open

    public static function unsetValueWithComplexName(&$array, $complexName) {
        if (!is_array($complexName)) {
            $complexName = self::parseComplexName($complexName);
        }

Severity: Minor
Found in framework/helpers/Naming.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method __call() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
Open

    public function __call($methodName, $methodParams) {
        /*
         * Selects DBObject record by some field value.
         *
         * @param <mixed> Value of the field
Severity: Minor
Found in framework/db/DBSelector.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method getBouncedEmails() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
Open

    public function getBouncedEmails($delete = true, $number = null) {
        $emails = [];

        for ($i = 1; (is_null($number) ? true : $i <= $number); $i++) {
            $message = $this->getMessage($i);
Severity: Minor
Found in framework/mail/POP.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method _get() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10.
Open

    public static function _get($ip, $type, $provider) {
        if (!filter_var($ip, FILTER_VALIDATE_IP)) {
            throw new LocationDetectorException("Invalid IP address.");
        }

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method start() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
Open

    public function start() {
        switch ($this->direction) {
            case (self::TO_OUTPUT_STREAM):
                OutputStream::start();

Severity: Minor
Found in framework/tools/logging/Logger.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The variable $_FIELDS is not named in camelCase.
Open

    public static function setFieldValue($fieldName, $fieldValue) {
        global $_FIELDS;

        Naming::setValueWithComplexName($_FIELDS, $fieldName, $fieldValue);
    }
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function changeFieldValue($fieldName, $fieldValue) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            $_FIELDS[$fieldName] = $fieldValue;
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function normalizeCheckboxes($fieldNames) {
        global $_FIELDS;

        foreach ($fieldNames as $fieldName) {
            $_FIELDS[$fieldName] = (int)(bool)self::getFieldValue($fieldName);
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_USER is not named in camelCase.
Open

    public static function logout() {
        global $_USER;

        $_USER = null;
        session_unset();
Severity: Minor
Found in classes/db/access/User.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function castFieldValue($fieldName, $type) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            switch ($type) {
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function castFieldValue($fieldName, $type) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            switch ($type) {
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_LANG is not named in camelCase.
Open

    public function sendSignUpNotification($user) {
        global $_LANG;

        if (!Validator::isEmail($user->email)) {
            throw new \Exception("Invalid email: '" . $user->email . "'");
Severity: Minor
Found in classes/Email.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function castFieldValue($fieldName, $type) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            switch ($type) {
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_LANG is not named in camelCase.
Open

    public function sendSignUpNotification($user) {
        global $_LANG;

        if (!Validator::isEmail($user->email)) {
            throw new \Exception("Invalid email: '" . $user->email . "'");
Severity: Minor
Found in classes/Email.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_USER is not named in camelCase.
Open

    public static function logout() {
        global $_USER;

        $_USER = null;
        session_unset();
Severity: Minor
Found in classes/db/access/User.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function setFieldValue($fieldName, $fieldValue) {
        global $_FIELDS;

        Naming::setValueWithComplexName($_FIELDS, $fieldName, $fieldValue);
    }
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function changeFieldValue($fieldName, $fieldValue) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            $_FIELDS[$fieldName] = $fieldValue;
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function castFieldValue($fieldName, $type) {
        global $_FIELDS;

        if (isset($_FIELDS[$fieldName])) {
            switch ($type) {
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_FIELDS is not named in camelCase.
Open

    public static function removeFields($fieldNames) {
        global $_FIELDS;

        foreach ($fieldNames as $fieldName) {
            Naming::unsetValueWithComplexName($_FIELDS, $fieldName);
Severity: Minor
Found in framework/web/Request.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_USER is not named in camelCase.
Open

    public static function checkLoggedIn() {
        global $_USER;

        if (Tools::isInstanceOf($_USER, new self)) {
            return true;
Severity: Minor
Found in classes/db/access/User.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

Severity
Category
Status
Source
Language