AppStateESS/homestead

View on GitHub
class/Exception/RoommateCompatibilityException.php

Summary

Maintainability
B
5 hrs
Test Coverage

Method resolveCode has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function resolveCode($code)
    {
        switch($code) {
            case E_ROOMMATE_MALFORMED_USERNAME:
                return "Malformed Username.";
Severity: Minor
Found in class/Exception/RoommateCompatibilityException.php - About 1 hr to fix

Avoid too many return statements within this method.
Open

                return "You can not choose a student of a different type than yourself (i.e. a freshmen student can only request another freshmen student, and not a transfer or continuing student).";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Your requested roommate has not filled out a housing application.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Please select a roommate of the same sex as yourself.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "You already have an uncomfirmed roommate request.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Unknown Error $result.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Your roommate request could not be completed because you and/or your requested roommate have applied for different Residential Learning Communities.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "You already have a pending roommate request.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Your roommate request could not be completed because you and/or your requested roommate are assigned to a Residential Learning Community, and you are both not a member of the same Residential Learning Community.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return "Your requested roommate does not seem to have a student record.  Please be sure you typed the username correctly.";
Severity: Major
Found in class/Exception/RoommateCompatibilityException.php - About 30 mins to fix

There are no issues that match your filters.

Category
Status