AppStateESS/InternshipInventory

View on GitHub
class/Faculty.php

Summary

Maintainability
B
4 hrs
Test Coverage

Faculty has 27 functions (exceeds 20 allowed). Consider refactoring.
Open

class Faculty extends Model implements DbStorable {

    public $id;
    private $username;

Severity: Minor
Found in class/Faculty.php - About 3 hrs to fix

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

    public function __construct($id, $username, $firstName, $lastName, $phone, $fax, $streetAddress1, $streetAddress2, $city, $state, $zip)
Severity: Major
Found in class/Faculty.php - About 1 hr to fix

The method __construct has 11 parameters. Consider reducing the number of parameters to less than 10.
Open

    public function __construct($id, $username, $firstName, $lastName, $phone, $fax, $streetAddress1, $streetAddress2, $city, $state, $zip)
    {
        $this->setId($id);
        $this->setUsername($username);

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

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

    public function setId($id)
Severity: Minor
Found in class/Faculty.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

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

    public $id;
Severity: Minor
Found in class/Faculty.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

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

    public function __construct($id, $username, $firstName, $lastName, $phone, $fax, $streetAddress1, $streetAddress2, $city, $state, $zip)
Severity: Minor
Found in class/Faculty.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

There are no issues that match your filters.

Category
Status