AppStateESS/InternshipInventory

View on GitHub

Showing 6,675 of 6,675 total issues

get accesses the super-global variable $_GET.
Open

    public function get()
    {
        $dept = $_GET['dept'];

        if (is_null($dept) || !isset($dept)) {

Superglobals

Since: 0.2

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

Example

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

Source

checkForMissingInput accesses the super-global variable $_POST.
Open

    private function checkForMissingInput() {
        // Check for missing data
        $missingFieldList = array();

        // Check student ID
Severity: Minor
Found in class/Command/AddInternship.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

post accesses the super-global variable $_REQUEST.
Open

    public function post()
    {
        $user = $_REQUEST['user'];
        $dept = $_REQUEST['dept'];

Severity: Minor
Found in class/Command/AdminRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute() {
        /* Check if user should have access to Host page */
        if(!\Current_User::isLogged()){
            \NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, 'You do not have permission to view Hosts.');
            throw new \Intern\Exception\PermissionException('You do not have permission to view Hosts.');
Severity: Minor
Found in class/Command/ConditionRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

get accesses the super-global variable $_REQUEST.
Open

    public function get()
    {
        $affiliationId = $_REQUEST['affiliation_agreement_id'];

        $agreement = AffiliationAgreementFactory::getAffiliationById($affiliationId);
Severity: Minor
Found in class/Command/AffiliateRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute()
    {
        /* Check if user should have access to folders */
        if (!\Current_User::isLogged()) {
            \NQ::simple('intern', \Intern\UI\NotifyUI::WARNING,
Severity: Minor
Found in class/Command/DocumentRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

deleteFile accesses the super-global variable $_REQUEST.
Open

    public function deleteFile()
    {
        $id = $_REQUEST['id'];
        $docId = $_REQUEST['docId'];
        $type = $_REQUEST['type'];
Severity: Minor
Found in class/Command/DocumentRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

checkForMissingInput accesses the super-global variable $_POST.
Open

    private function checkForMissingInput() {
        // Check for missing data
        $missingFieldList = array();

        // Check student ID
Severity: Minor
Found in class/Command/AddInternship.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute()
    {

        switch($_SERVER['REQUEST_METHOD']) {
            case 'POST':
Severity: Minor
Found in class/Command/AdminRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

get accesses the super-global variable $_REQUEST.
Open

    public function get()
    {
        $affiliationId = $_REQUEST['affiliation_agreement_id'];

        if (is_null($affiliationId) || !isset($affiliationId)) {
Severity: Minor
Found in class/Command/AffiliateDeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute()
    {
        /* Check if user should have access to Affiliate Agreement page */
        if(!\Current_User::allow('intern', 'affiliation_agreement')){
            \NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, 'You do not have permission to add Affiliation Agreements.');
Severity: Minor
Found in class/Command/AffiliateStateRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

put accesses the super-global variable $_REQUEST.
Open

    public function put()
    {
        $db = Database::newDB();
        $pdo = $db->getPDO();

Severity: Minor
Found in class/Command/DeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

put accesses the super-global variable $_REQUEST.
Open

    public function put()
    {
        $db = Database::newDB();
        $pdo = $db->getPDO();

Severity: Minor
Found in class/Command/DeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

checkForMissingInput accesses the super-global variable $_POST.
Open

    private function checkForMissingInput() {
        // Check for missing data
        $missingFieldList = array();

        // Check student ID
Severity: Minor
Found in class/Command/AddInternship.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute()
    {
        /* Check if user should have access to Affiliate Agreement page */
        if(!\Current_User::allow('intern', 'affiliation_agreement')){
            \NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, 'You do not have permission to add Affiliation Agreements.');
Severity: Minor
Found in class/Command/AffiliateDeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

post accesses the super-global variable $_REQUEST.
Open

    public function post()
    {
        $deptId = $_REQUEST['department'];
        $affiliationId = $_REQUEST['affiliation_agreement_id'];

Severity: Minor
Found in class/Command/AffiliateDeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

delete accesses the super-global variable $_REQUEST.
Open

    public function delete()
    {
        $deptId = $_REQUEST['department'];
        $affiliationId = $_REQUEST['affiliation_agreement_id'];

Severity: Minor
Found in class/Command/AffiliateDeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

execute accesses the super-global variable $_SERVER.
Open

    public function execute()
    {

        switch($_SERVER['REQUEST_METHOD']) {
            case 'PUT':
Severity: Minor
Found in class/Command/DeptRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

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

    public function post($contractDir, $otherDir, $affiliationDir)
    {
        // List of known types taken from fileca$target_dir = $otherDir;binet. Only these accepted, update list of accept more.
        $known_documents = array('csv', 'doc', 'docx', 'odt', 'pdf', 'ppt', 'pptx', 'rtf',
            'tar', 'tgz', 'txt', 'xls', 'xlsx', 'xml', 'zip', 'gz', 'rar', 'ods', 'odp');
Severity: Minor
Found in class/Command/DocumentRest.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

put accesses the super-global variable $_REQUEST.
Open

    public function put()
    {
        $id = $_REQUEST['internId'];

        $db = Database::newDB();
Severity: Minor
Found in class/Command/AgreementTypeRest.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

Severity
Category
Status
Source
Language