Kylob/BootPress

View on GitHub

Showing 16,700 of 16,700 total issues

Each class must be in a file by itself
Open

Function next has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function next(&$delayed, $time)
    {
        $html = '-';
        if (!empty($delayed)) {
            $delay = $delayed - $time;
Severity: Minor
Found in src/Admin/Pages/Analytics.php - About 35 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 editProfile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static function editProfile($user_id)
    {
        extract(Admin::params('bp', 'page', 'auth', 'website'));
        $page->title = 'Edit Your Profile at '.$website;
        $html = '';
Severity: Minor
Found in src/Admin/Pages/Users.php - About 35 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 check has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function check($email, $password = null, $and = null)
    {
        $check = func_get_args();
        $email = array_shift($check);
        if (empty($check)) {
Severity: Minor
Found in src/Auth/Component.php - About 35 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

The CASE body must start on the line following the statement
Open

                case 3: $type = 'png'; break;
Severity: Minor
Found in src/Admin/Files.php by phpcodesniffer

Each PHP statement must be on a line by itself
Open

The CASE body must start on the line following the statement
Open

The CASE body must start on the line following the statement
Open

The CASE body must start on the line following the statement
Open

                case 2: $type = 'jpg'; break;
Severity: Minor
Found in src/Admin/Files.php by phpcodesniffer

CASE keyword must be followed by a single space
Open

Expected "function abc(...)"; found "function\nabc(...)"
Open

Each PHP statement must be on a line by itself
Open

                case 1: $type = 'gif'; break;
Severity: Minor
Found in src/Admin/Files.php by phpcodesniffer

Expected 1 space after "as"; 0 found
Open

Each PHP statement must be on a line by itself
Open

CASE keyword must be followed by a single space
Open

The CASE body must start on the line following the statement
Open

Each PHP statement must be on a line by itself
Open

The CASE body must start on the line following the statement
Open

Each PHP statement must be on a line by itself
Open

Each PHP statement must be on a line by itself
Open

                case 3: $type = 'png'; break;
Severity: Minor
Found in src/Admin/Files.php by phpcodesniffer
Severity
Category
Status
Source
Language