display accesses the super-global variable $_REQUEST. Open
public function display()
{
javascript('jquery');
\Layout::addPageTitle('Search Results');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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,
- Read upRead up
- Create a ticketCreate a ticket
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,
- Create a ticketCreate a ticket
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()
{
- Create a ticketCreate a ticket
- Exclude checks
Method display
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display()
{
javascript('jquery');
\Layout::addPageTitle('Search Results');
- Create a ticketCreate a ticket
Function display
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function display()
{
javascript('jquery');
\Layout::addPageTitle('Search Results');
- Read upRead up
- Create a ticketCreate a ticket
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,
- Create a ticketCreate a ticket
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');
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 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,
- Create a ticketCreate a ticket
- Exclude checks
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,
- Create a ticketCreate a ticket
- Exclude checks
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,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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'));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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::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.");
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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')) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 local variables such as '$subHost'. Open
$subHost = null;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 unused parameters such as '$subHost'. Open
$startDate = null, $endDate = null, $host = null, $subHost = null)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 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');
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 reroute
from undeclared class \PHPWS_Core
Open
return \PHPWS_Core::reroute($url);
- Create a ticketCreate a ticket
- Exclude checks
Call to method allow
from undeclared class \Current_User
Open
if (!\Current_User::isDeity() && !\Current_User::allow('intern',
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addSubSelect($fuzzyDb, 'fuzzy');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->display_rows
Open
if (is_null($pager->display_rows) || sizeof($pager->display_rows) == 0) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \javascript()
Open
javascript('jquery');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->tables = array();
- Create a ticketCreate a ticket
- Exclude checks
Call to method addPageTitle
from undeclared class \Layout
Open
\Layout::addPageTitle('Search Results');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addJoin('', 'fuzzy', 'intern_admin', 'department_id',
- Create a ticketCreate a ticket
- Exclude checks
Call to method isDeity
from undeclared class \Current_User
Open
if (!\Current_User::isDeity() && !\Current_User::allow('intern',
- Create a ticketCreate a ticket
- Exclude checks
Call to method close
from undeclared class \NQ
Open
\NQ::close();
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addWhere("fuzzy.t{$i}_metalev", $fuzzyTolerance,
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addOrder($orderByList);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addColumnRaw('fuzzy.*');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addWhere('state', $path[2], '=', 'OR',
- Create a ticketCreate a ticket
- Exclude checks
Call to method linkAddress
from undeclared class \PHPWS_Text
Open
$pageTags['BACK_LINK_URI'] = \PHPWS_Text::linkAddress('intern',
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Student
(\Intern\Student)
Open
use Intern\Student;
- Create a ticketCreate a ticket
- Exclude checks
Call to method getUsername
from undeclared class \Current_User
Open
\Current_User::getUsername());
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addWhere("fuzzy.t{$i}_lev", 3, '<', 'OR',
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addJoin('LEFT OUTER', 'fuzzy', 'intern_faculty',
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addJOIN('LEFT OUTER', 'fuzzy', 'intern_department',
- Create a ticketCreate a ticket
- Exclude checks
Argument 1 (querydata)
is ?array
but \http_build_query()
takes array|object
Open
$url .= http_build_query($_REQUEST);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addTable('intern_internship', 'fuzzy');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \Intern\SubselectPager->db
Open
$pager->db->addWhere('oied_certified', $oied, '=');
- Create a ticketCreate a ticket
- Exclude checks
Call to method simple
from undeclared class \NQ
Open
\NQ::simple('intern', NotifyUI::WARNING,
- Create a ticketCreate a ticket
- Exclude checks