AppStateESS/InternshipInventory

View on GitHub
class/UI/ResultsUI.php

Summary

Maintainability
D
2 days
Test Coverage

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display accesses the super-global variable $_REQUEST.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Function getPager has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Minor
Found in class/UI/ResultsUI.php - About 1 day 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

Method getPager has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Major
Found in class/UI/ResultsUI.php - About 5 hrs to fix

The class ResultsUI has an overall complexity of 76 which is very high. The configured complexity threshold is 50.
Open

class ResultsUI implements UI
{

    public function display()
    {
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

Method display has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Major
Found in class/UI/ResultsUI.php - About 3 hrs to fix

Function display has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php - About 3 hrs 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

Method getPager has 21 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Major
Found in class/UI/ResultsUI.php - About 2 hrs to fix

The method getPager() has 247 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

The method getPager has 21 parameters. Consider reducing the number of parameters to less than 10.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

The method display() has an NPath complexity of 4718592. The configured NPath complexity threshold is 200.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

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

The method getPager() has an NPath complexity of 33331979520. The configured NPath complexity threshold is 200.
Open

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

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

The method display() has 106 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

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

    private static function getPager($name = null, $deptId = null, $term = null,
            $ugradMajor = null, $gradProg = null, $level = null, $type = null,
            $campus = null, $loc = null, $state = null, $country = null,
            $workflowState = null, $courseSubject = null, $courseNum = null,
            $courseSect = null, $oied = null, $faculty = null,
Severity: Minor
Found in class/UI/ResultsUI.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 display() has a Cyclomatic Complexity of 24. The configured cyclomatic complexity threshold is 10.
Open

    public function display()
    {
        javascript('jquery');

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.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

Avoid using static access to class '\NQ' in method 'display'.
Open

            \NQ::simple('intern', NotifyUI::WARNING,
                    "There were no internships that matched your search criteria. If you're looking for a specific student double check the student's name, id number, or email address. Otherwise, try selecting less search criteria and then search again.");
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\PHPWS_Text' in method 'getPager'.
Open

        $pageTags['BACK_LINK_URI'] = \PHPWS_Text::linkAddress('intern',
                        array('action' => 'search'));
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\NQ' in method 'display'.
Open

            \NQ::close();
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\PHPWS_Core' in method 'display'.
Open

            return \PHPWS_Core::reroute($url);
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Current_User' in method 'getPager'.
Open

                    \Current_User::getUsername());
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Layout' in method 'display'.
Open

        \Layout::addPageTitle('Search Results');
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Current_User' in method 'getPager'.
Open

        if (!\Current_User::isDeity() && !\Current_User::allow('intern',
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Intern\LevelFactory' in method 'getPager'.
Open

            $sLevel = LevelFactory::getLevelObjectByLevel($level);
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Current_User' in method 'getPager'.
Open

        if (!\Current_User::isDeity() && !\Current_User::allow('intern',
                        'all_departments')) {
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid unused parameters such as '$subHost'.
Open

            $startDate = null, $endDate = null, $host = null, $subHost = null)
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused local variables such as '$subHost'.
Open

        $subHost = null;
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid using Intern\UI\count() function in for loops.
Open

                for ($i = 0; $i < count($sLevel); $i++) {
                    $pager->addWhere('level', $sLevel[$i]->code, null, 'OR',
                            'grad_level');
                }
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

CountInLoopExpression

Since: 2.7.0

Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

Example

class Foo {

  public function bar()
  {
    $array = array();

    for ($i = 0; count($array); $i++) {
      // ...
    }
  }
}

Source https://phpmd.org/rules/design.html#countinloopexpression

Avoid using Intern\UI\count() function in for loops.
Open

                for ($i = 0; $i < count($sLevel); $i++) {
                    $pager->addWhere('level', $sLevel[$i]->code, null, 'OR',
                            'grad_level');
                }
Severity: Minor
Found in class/UI/ResultsUI.php by phpmd

CountInLoopExpression

Since: 2.7.0

Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

Example

class Foo {

  public function bar()
  {
    $array = array();

    for ($i = 0; count($array); $i++) {
      // ...
    }
  }
}

Source https://phpmd.org/rules/design.html#countinloopexpression

Call to method isDeity from undeclared class \Current_User
Open

        if (!\Current_User::isDeity() && !\Current_User::allow('intern',
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

            $pager->db->addJoin('', 'fuzzy', 'intern_admin', 'department_id',
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->display_rows
Open

        if (is_null($pager->display_rows) || sizeof($pager->display_rows) == 0) {
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to method close from undeclared class \NQ
Open

            \NQ::close();
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Call to method reroute from undeclared class \PHPWS_Core
Open

            return \PHPWS_Core::reroute($url);
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Possibly zero references to use statement for classlike/namespace Student (\Intern\Student)
Open

use Intern\Student;
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to method allow from undeclared class \Current_User
Open

        if (!\Current_User::isDeity() && !\Current_User::allow('intern',
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

                $pager->db->addWhere("fuzzy.t{$i}_metalev", $fuzzyTolerance,
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to method linkAddress from undeclared class \PHPWS_Text
Open

        $pageTags['BACK_LINK_URI'] = \PHPWS_Text::linkAddress('intern',
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

        $pager->db->tables = array();
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Argument 1 (querydata) is ?array but \http_build_query() takes array|object
Open

            $url .= http_build_query($_REQUEST);
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to method getUsername from undeclared class \Current_User
Open

                    \Current_User::getUsername());
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

                $pager->db->addWhere("fuzzy.t{$i}_lev", 3, '<', 'OR',
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

        $pager->db->addJoin('LEFT OUTER', 'fuzzy', 'intern_faculty',
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to undeclared function \javascript()
Open

        javascript('jquery');
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

        $pager->db->addTable('intern_internship', 'fuzzy');
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

            $pager->db->addOrder($orderByList);
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

            $pager->db->addSubSelect($fuzzyDb, 'fuzzy');
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

            $pager->db->addColumnRaw('fuzzy.*');
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

        $pager->db->addJOIN('LEFT OUTER', 'fuzzy', 'intern_department',
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

            $pager->db->addWhere('oied_certified', $oied, '=');
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Reference to undeclared property \Intern\SubselectPager->db
Open

                $pager->db->addWhere('state', $path[2], '=', 'OR',
Severity: Minor
Found in class/UI/ResultsUI.php by phan

Call to method addPageTitle from undeclared class \Layout
Open

        \Layout::addPageTitle('Search Results');
Severity: Critical
Found in class/UI/ResultsUI.php by phan

Call to method simple from undeclared class \NQ
Open

            \NQ::simple('intern', NotifyUI::WARNING,
Severity: Critical
Found in class/UI/ResultsUI.php by phan

There are no issues that match your filters.

Category
Status