AppStateESS/InternshipInventory

View on GitHub
class/EditInternshipFormView.php

Summary

Maintainability
F
4 days
Test Coverage

Function buildInternshipForm has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
Open

    public function buildInternshipForm() {
        javascript('jquery');
        javascript('jquery_ui');

        // Form Submission setup, only allowed to save if you have permission
Severity: Minor
Found in class/EditInternshipFormView.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 buildInternshipForm has 226 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function buildInternshipForm() {
        javascript('jquery');
        javascript('jquery_ui');

        // Form Submission setup, only allowed to save if you have permission
Severity: Major
Found in class/EditInternshipFormView.php - About 1 day to fix

File EditInternshipFormView.php has 459 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * This file is part of Internship Inventory.
 *
 * Internship Inventory is free software: you can redistribute it and/or modify
Severity: Minor
Found in class/EditInternshipFormView.php - About 7 hrs to fix

Function plugStudent has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

    private function plugStudent() {
        // Student
        $this->tpl['BANNER'] = $this->intern->getBannerId();
        $this->tpl['STUDENT_FIRST_NAME'] = $this->intern->getFirstName();
        $this->tpl['STUDENT_MIDDLE_NAME'] = $this->intern->middle_name;
Severity: Minor
Found in class/EditInternshipFormView.php - About 5 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

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

class EditInternshipFormView {

    private $form;
    private $intern;
    private $student;
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

Method plugStudent has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function plugStudent() {
        // Student
        $this->tpl['BANNER'] = $this->intern->getBannerId();
        $this->tpl['STUDENT_FIRST_NAME'] = $this->intern->getFirstName();
        $this->tpl['STUDENT_MIDDLE_NAME'] = $this->intern->middle_name;
Severity: Major
Found in class/EditInternshipFormView.php - About 2 hrs to fix

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function __construct(Internship $i, Student $student = null, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours)
Severity: Minor
Found in class/EditInternshipFormView.php - About 45 mins to fix

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

    public function buildInternshipForm() {
        javascript('jquery');
        javascript('jquery_ui');

        // Form Submission setup, only allowed to save if you have permission
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

The method buildInternshipForm() has an NPath complexity of 7171200. The configured NPath complexity threshold is 200.
Open

    public function buildInternshipForm() {
        javascript('jquery');
        javascript('jquery_ui');

        // Form Submission setup, only allowed to save if you have permission
Severity: Minor
Found in class/EditInternshipFormView.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 buildInternshipForm() has a Cyclomatic Complexity of 33. The configured cyclomatic complexity threshold is 10.
Open

    public function buildInternshipForm() {
        javascript('jquery');
        javascript('jquery_ui');

        // Form Submission setup, only allowed to save if you have permission
Severity: Minor
Found in class/EditInternshipFormView.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 plugStudent() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
Open

    private function plugStudent() {
        // Student
        $this->tpl['BANNER'] = $this->intern->getBannerId();
        $this->tpl['STUDENT_FIRST_NAME'] = $this->intern->getFirstName();
        $this->tpl['STUDENT_MIDDLE_NAME'] = $this->intern->middle_name;
Severity: Minor
Found in class/EditInternshipFormView.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 class EditInternshipFormView has a coupling between objects value of 17. Consider to reduce the number of dependencies under 13.
Open

class EditInternshipFormView {

    private $form;
    private $intern;
    private $student;
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

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

Missing class import via use statement (line '76', column '27').
Open

        $this->form = new \PHPWS_Form('internship');
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

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

            if(\Current_User::allow('intern', $p)){
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        if(\Current_User::allow('intern', 'sig_auth_approve')){
Severity: Minor
Found in class/EditInternshipFormView.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\TermFactory' in method 'buildInternshipForm'.
Open

                $nextTwoTerm = TermFactory::getNextTerm($nextTerm);
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        if($this->intern->getStateName() != 'DeniedState' && \Current_User::allow('intern', 'create_internship')){
Severity: Minor
Found in class/EditInternshipFormView.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\TermFactory' in method 'buildInternshipForm'.
Open

            $term = TermFactory::getTermByTermCode($this->intern->getTerm());
Severity: Minor
Found in class/EditInternshipFormView.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\DepartmentFactory' in method 'buildInternshipForm'.
Open

                $depts = DepartmentFactory::getDepartmentsAssoc();
Severity: Minor
Found in class/EditInternshipFormView.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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            }else{
                $this->tpl['DRUG_CHECK_REQUEST_BTN'] = 'Send Drug Screening Request';
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

        \Layout::addPageTitle('Edit Internship');
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        } else if(!\Current_User::allow('intern', 'create_internship')){
Severity: Minor
Found in class/EditInternshipFormView.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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $nextThreeTerm = null;
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else{
            $this->tpl['CONTINUE_TERM_NO_TERMS'] = 'No future terms available.';
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\Intern\TermFactory' in method 'buildInternshipForm'.
Open

            $nextTerm = TermFactory::getNextTerm($term);
Severity: Minor
Found in class/EditInternshipFormView.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\TermFactory' in method 'buildInternshipForm'.
Open

                $nextThreeTerm = TermFactory::getNextTerm($nextTwoTerm);
Severity: Minor
Found in class/EditInternshipFormView.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 '__construct'.
Open

        $this->tpl['DEITY_STAT'] = \Current_User::isDeity();
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        if (\Current_User::isDeity()) {
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        if(!\Current_User::allow('intern', 'oied_certify') || $this->intern->isDomestic()){
Severity: Minor
Found in class/EditInternshipFormView.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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $depts = DepartmentFactory::getDepartmentsAssoc();
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\Intern\DepartmentFactory' in method 'buildInternshipForm'.
Open

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername(), $this->intern->department_id);
Severity: Minor
Found in class/EditInternshipFormView.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 'plugHost'.
Open

        if (!\Current_User::isDeity()) {
Severity: Minor
Found in class/EditInternshipFormView.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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else{
            $this->form->setAction('index.php?module=intern&action=ShowInternship&internship_id=' . $this->intern->getId());
            $this->form->addSubmit('submit', 'Refresh');
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

        if (\Current_User::isDeity()) {
Severity: Minor
Found in class/EditInternshipFormView.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\DepartmentFactory' in method 'buildInternshipForm'.
Open

                $depts = DepartmentFactory::getDepartmentsAssoc($this->intern->department_id);
Severity: Minor
Found in class/EditInternshipFormView.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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        }else {
            if (!is_null($this->intern)){
                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername(), $this->intern->department_id);
            }else{
                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername());
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername(), $this->intern->department_id);
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if($this->intern->getMajorDescription() != null){
                $this->tpl['MAJOR'] = $this->intern->getMajorDescription();
            } else{
                $this->tpl['MAJOR'] = '<span class="text-muted"><em>Not Available</em></span>';
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\Intern\DepartmentFactory' in method 'buildInternshipForm'.
Open

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername());
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        }else{
            $this->tpl['LEVEL'] = $this->intern->getLevelFormatted();
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $nextTwoTerm = null;
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            }else{
                $this->tpl['BACK_CHECK_REQUEST_BTN'] = 'Send Background Check Request';
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugSupervisor uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->formVals['supervisor_province']    = $this->supervisor->supervisor_province;
            $this->form->setMatch('supervisor_country', $this->supervisor->supervisor_country);
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            }else{
                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername());
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->tpl['ENROLLED_CREDIT_HORUS'] = '<span class="text-muted"><em>Not Available</em></span>';
            $this->tpl['GRAD_DATE'] = '<span class="text-muted"><em>Not Available</em></span>';
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $this->tpl['majors_repeat'][] = array('CODE' => $m->getCode(), 'DESC' => $m->getDescription(), 'ACTIVE' => '', 'CHECKED' => '');
                    }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugInternInfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->form->setMatch('payment', 'unpaid');
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\Intern\TermFactory' in method 'buildInternshipForm'.
Open

            $terms = TermFactory::getTermsAssoc();
Severity: Minor
Found in class/EditInternshipFormView.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\Subject' in method 'buildInternshipForm'.
Open

        $subjects = array("-1" => "Select subject...") + Subject::getSubjects();
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugInternInfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->form->setValue('oied_certified_hidden', 'false');
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugHost uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->tpl['HOST_PROVINCE'] = $this->host->province;
            $this->tpl['HOST_COUNTRY'] = $this->host->country;
            $this->tpl['HOST_ZIP_LABEL_TEXT'] = 'Postal Code';
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername());
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        }else{
            $this->tpl['CAMPUS'] = $this->intern->getCampusFormatted();
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

        if (\Current_User::isDeity()) {
Severity: Minor
Found in class/EditInternshipFormView.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\SubHostFactory' in method 'plugHost'.
Open

            $host_id = SubHostFactory::getSubHostCond($this->host->main_host_id, $this->host->state, $this->host->country);
Severity: Minor
Found in class/EditInternshipFormView.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\CountryFactory' in method 'buildInternshipForm'.
Open

            $countries = CountryFactory::getCountries();
Severity: Minor
Found in class/EditInternshipFormView.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\Internship' in method 'plugStudent'.
Open

            $campus = Internship::getCampusAssoc();
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $this->tpl['GRAD_DATE'] = '<span class="text-muted"><em>Not Available</em></span>';
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $countries = CountryFactory::getCountries();
            asort($countries, SORT_STRING);
            $countries = array('-1' => 'Select Country') + $countries;

Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method buildInternshipForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        }else{
            $this->tpl['TERM'] = $this->term->getDescription();
        }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

            $level = LevelFactory::getLevelList();
Severity: Minor
Found in class/EditInternshipFormView.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 'plugStudent'.
Open

        if (\Current_User::isDeity()) {
Severity: Minor
Found in class/EditInternshipFormView.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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $this->tpl['ENROLLED_CREDIT_HORUS'] = '<span class="text-muted"><em>Not Available</em></span>';
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                if($this->intern->getMajorDescription() != null){
                    $this->tpl['MAJOR'] = $this->intern->getMajorDescription();
                } else{
                    $this->tpl['MAJOR'] = '<span class="text-muted"><em>Not Available</em></span>';
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else{
                    $this->tpl['MAJOR'] = '<span class="text-muted"><em>Not Available</em></span>';
                }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method plugStudent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else{
                $this->tpl['MAJOR'] = '<span class="text-muted"><em>Not Available</em></span>';
            }
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class 'Intern\Subject' in method 'plugCourseInfo'.
Open

        $this->form->addSelect('course_subj', array('-1' => 'Select Subject...') + Subject::getSubjects($this->intern->course_subj));
Severity: Minor
Found in class/EditInternshipFormView.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\Internship' in method 'buildInternshipForm'.
Open

        $this->form->addRadioAssoc('experience_type', Internship::getTypesAssoc());
Severity: Minor
Found in class/EditInternshipFormView.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 'buildInternshipForm'.
Open

        if (\Current_User::allow('intern', 'change_term')) {
Severity: Minor
Found in class/EditInternshipFormView.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

Saw an @param annotation for pagetitle, but it was not found in the param list of function __construct(\Intern\Internship $i, ?\Intern\Student $student = null, \Intern\SubHost $host, \Intern\Supervisor $supervisor, \Intern\Term $term, $studentExistingCreditHours)
Open

     * @param string $pagetitle
Severity: Info
Found in class/EditInternshipFormView.php by phan

Call to undeclared function \javascriptMod()
Open

        javascriptMod('intern', 'formGoodies', array('perm' => (string)$permAllowed, 'id' => $this->intern->getId()));
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setAction from undeclared class \PHPWS_Form
Open

            $this->form->setAction('index.php?module=intern&action=ShowInternship&internship_id=' . $this->intern->getId());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

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

use Intern\Command\MajorRest;
Severity: Minor
Found in class/EditInternshipFormView.php by phan

Call to method mergeTemplate from undeclared class \PHPWS_Form
Open

        $this->form->mergeTemplate($this->getTemplateTags());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Required argument follows optional
Open

    public function __construct(Internship $i, Student $student = null, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours)
Severity: Info
Found in class/EditInternshipFormView.php by phan

Call to method addPageTitle from undeclared class \Layout
Open

        \Layout::addPageTitle('Edit Internship');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        $this->tpl['DEITY_STAT'] = \Current_User::isDeity();
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setAction from undeclared class \PHPWS_Form
Open

            $this->form->setAction('index.php?module=intern&action=SaveInternship');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to undeclared function \javascript()
Open

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

Call to undeclared function \javascript()
Open

        javascript('jquery_ui');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSubmit from undeclared class \PHPWS_Form
Open

            $this->form->addSubmit('submit', 'Refresh');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

        if($this->intern->getStateName() != 'DeniedState' && \Current_User::allow('intern', 'create_internship')){
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method __construct from undeclared class \PHPWS_Form
Open

        $this->form = new \PHPWS_Form('internship');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        if (\Current_User::isDeity()) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

            if(\Current_User::allow('intern', $p)){
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSubmit from undeclared class \PHPWS_Form
Open

            $this->form->addSubmit('submit', 'Save');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to undeclared method \Intern\WorkflowState::getAllowedPermissionList
Open

        $permAllowSave = $currentState->getAllowedPermissionList();
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_phone', 'Phone');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('supervisor_state', State::$UNITED_STATES);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('end_date', 'End Date');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('avg_hours_week');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('host_id', $this->host->id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('supervisor_country', $this->supervisor->supervisor_country);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('student_phone', 'Phone');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_zip');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

            $this->form->addHidden('location', 'domestic');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('remote_state', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('multipart');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('secondary_part');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('course_sect', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('SUB_NAME', $this->host->id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

        } else if(!\Current_User::allow('intern', 'create_internship')){
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('student_phone');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('faculty', 'Faculty Supervisor / Instructor of Record');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('supervisor_country', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('remote', 'This internship is remote.');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('host_phone');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('course_title');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('campus', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

        $this->form->addSelect('department', $depts);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

        $this->form->addSelect('faculty', array(-1=>'Select Faculty Supervisor'));
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('supervisor_province', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('host_phone', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('pay_rate', 'Pay Rate');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('form_token', $this->intern->getFormToken());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('student_phone', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('bgcheck', $this->intern->bgcheck);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_first_name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('term', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('start_date', 'Start Date');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('secondary_part', 'This is a secondary part (enrollment complete through primary part).');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

        $this->form->addSelect('course_subj', $subjects);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('course_no', 'Number');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('course_title', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('notes', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('SUB_NAME', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('student_preferred_name', 'Chosen Name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('department', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_title', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_phone', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_zip', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_fax', 'Fax');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('remote_state', 'Remote State');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('end_date');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('course_no', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('pay_rate', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Argument 2 (timestamp) is null but \date() takes int
Open

        $this->formVals['start_date'] = $this->intern->start_date ? date('m/d/Y', $this->intern->start_date) : null;
Severity: Minor
Found in class/EditInternshipFormView.php by phan

Argument 2 (timestamp) is null but \date() takes int
Open

        $this->formVals['end_date'] = $this->intern->end_date ? date('m/d/Y', $this->intern->end_date) : null;
Severity: Minor
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('oied_certified', 'Certified by Office of International Education and Development');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('oied_certified_hidden');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('faculty_id');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_last_name', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('copy_address');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_address');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_address', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

            $this->form->addText('supervisor_province');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

            $this->form->setLabel('supervisor_zip', 'Postal Code');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_fax');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

        $this->form->addSelect('remote_state', State::$UNITED_STATES);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('start_date', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addTextArea from undeclared class \PHPWS_Form
Open

        $this->form->addTextArea('notes');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('dcheck', $this->intern->dcheck);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

        if(\Current_User::allow('intern', 'sig_auth_approve')){
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('department', 'Department');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('department', $keys[1]);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('supervisor_country', $countries);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('start_date');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('credits', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('avg_hours_week', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('course_subj', 'Subject');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addRadioAssoc from undeclared class \PHPWS_Form
Open

        $this->form->addRadioAssoc('payment', $pay);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('payment', 'unpaid'); // Default to unpaid
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('stipend');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Reference to undeclared property \Intern\Supervisor->address_same_flag
Open

        $this->formVals['copy_address']           = $this->supervisor->address_same_flag == 't';
Severity: Minor
Found in class/EditInternshipFormView.php by phan

Call to method getUsername from undeclared class \Current_User
Open

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_first_name', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_phone');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('term', $terms);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

        if(!\Current_User::allow('intern', 'oied_certify') || $this->intern->isDomestic()){
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setExtra from undeclared class \PHPWS_Form
Open

            $this->form->setExtra('oied_certified', 'disabled="disabled" disabled');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('student_preferred_name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('bgcheck');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method getUsername from undeclared class \Current_User
Open

                $depts = DepartmentFactory::getDepartmentsAssocForUsername(\Current_User::getUsername(), $this->intern->department_id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('faculty', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('supervisor_state', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

            $this->form->addHidden('location', 'international');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('credits', 'Credit Hours');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('course_no');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('stipend', 'Stipend');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        if (\Current_User::isDeity()) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('level', $this->intern->level);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('remote', '1');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('dcheck');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_last_name', 'Last Name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_city');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMaxSize from undeclared class \PHPWS_Form
Open

        $this->form->setMaxSize('course_title',28); // Limit to 28 chars, per Banner
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

                $this->form->addCssClass('corequisite_course_sect', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('experience_type', 'internship');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('level', $level);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('SUB_NAME', $host_id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_title');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_title', 'Title');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_address', 'Address');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_email');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_city', 'City');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

            $this->form->setLabel('supervisor_state', 'State');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('copy_address', "Supervisor's information is same as host's");
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('remote');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_city', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('pay_rate');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

            $this->form->setLabel('supervisor_zip', 'Zip Code');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('notes', 'Notes');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

            $this->form->setLabel('supervisor_province', 'Province');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('term', $this->intern->term);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('end_date', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('course_subj', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('course_sect');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('course_sect', 'Section');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('course_title', 'Title');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Argument 1 (termCode) is int but \Intern\TermFactory::getTermByTermCode() takes string defined at /code/class/TermFactory.php:32
Open

            $term = TermFactory::getTermByTermCode($this->intern->getTerm());
Severity: Minor
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('student_preferred_name', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        if (\Current_User::isDeity()) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setExtra from undeclared class \PHPWS_Form
Open

        $this->form->setExtra('faculty', 'disabled');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_first_name', 'First Name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('credits');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('avg_hours_week', 'Average Hours per Week');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('experience_type', $this->intern->getExperienceType());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

            $this->form->addCssClass('level', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        if (!\Current_User::isDeity()) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('internship_id', $this->intern->id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

        $this->form->addText('supervisor_last_name');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

            $this->form->setLabel('supervisor_country', 'Country');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_fax', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('multipart', 'This internship is part of a multi-part experience.');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

                $this->form->addText('corequisite_course_sect');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addRadioAssoc from undeclared class \PHPWS_Form
Open

        $this->form->addRadioAssoc('experience_type', Internship::getTypesAssoc());
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method isDeity from undeclared class \Current_User
Open

        if (\Current_User::isDeity()) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('campus', $this->intern->campus);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addHidden from undeclared class \PHPWS_Form
Open

        $this->form->addHidden('supervisor_id', $this->supervisor->id);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCheck from undeclared class \PHPWS_Form
Open

        $this->form->addCheck('oied_certified');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setLabel from undeclared class \PHPWS_Form
Open

        $this->form->setLabel('supervisor_email', 'Email');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('supervisor_email', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method allow from undeclared class \Current_User
Open

        if (\Current_User::allow('intern', 'change_term')) {
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addText from undeclared class \PHPWS_Form
Open

                $this->form->addText('corequisite_course_num');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

                $this->form->addCssClass('corequisite_course_num', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method plugIn from undeclared class \PHPWS_Form
Open

        $this->form->plugIn($this->formVals);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

            $this->form->addSelect('campus', $campus);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('stipend', $this->intern->stipend);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addCssClass from undeclared class \PHPWS_Form
Open

        $this->form->addCssClass('course_subj', 'form-control');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('payment', 'paid');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method dropElement from undeclared class \PHPWS_Form
Open

        $this->form->dropElement('course_subj');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setValue from undeclared class \PHPWS_Form
Open

            $this->form->setValue('oied_certified_hidden', 'false');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('secondary_part', '1');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method addSelect from undeclared class \PHPWS_Form
Open

        $this->form->addSelect('course_subj', array('-1' => 'Select Subject...') + Subject::getSubjects($this->intern->course_subj));
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('multipart', '1');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('payment', 'unpaid');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

        $this->form->setMatch('course_subj', $this->intern->course_subj);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setMatch from undeclared class \PHPWS_Form
Open

            $this->form->setMatch('oied_certified', true);
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Call to method setValue from undeclared class \PHPWS_Form
Open

            $this->form->setValue('oied_certified_hidden', 'true');
Severity: Critical
Found in class/EditInternshipFormView.php by phan

Avoid excessively long variable names like $studentExistingCreditHours. Keep variable name length under 20.
Open

    public function __construct(Internship $i, Student $student = null, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours)
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $studentExistingCreditHours. Keep variable name length under 20.
Open

    private $studentExistingCreditHours;
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid variables with short names like $i. Configured minimum length is 3.
Open

    public function __construct(Internship $i, Student $student = null, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours)
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The variable $host_id is not named in camelCase.
Open

    private function plugHost() {

        if (!\Current_User::isDeity()) {
            $this->tpl['HOST_NAME'] = $this->host->getMainName();
            $host_id = SubHostFactory::getSubHostCond($this->host->main_host_id, $this->host->state, $this->host->country);
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $host_id is not named in camelCase.
Open

    private function plugHost() {

        if (!\Current_User::isDeity()) {
            $this->tpl['HOST_NAME'] = $this->host->getMainName();
            $host_id = SubHostFactory::getSubHostCond($this->host->main_host_id, $this->host->state, $this->host->country);
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $host_id is not named in camelCase.
Open

    private function plugHost() {

        if (!\Current_User::isDeity()) {
            $this->tpl['HOST_NAME'] = $this->host->getMainName();
            $host_id = SubHostFactory::getSubHostCond($this->host->main_host_id, $this->host->state, $this->host->country);
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $host_id is not named in camelCase.
Open

    private function plugHost() {

        if (!\Current_User::isDeity()) {
            $this->tpl['HOST_NAME'] = $this->host->getMainName();
            $host_id = SubHostFactory::getSubHostCond($this->host->main_host_id, $this->host->state, $this->host->country);
Severity: Minor
Found in class/EditInternshipFormView.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

There are no issues that match your filters.

Category
Status