AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

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

    public function save()
    {
        $db = PdoFactory::getPdoInstance();

        // Begin a new transaction
Severity: Minor
Found in class/RoomChangeRequest.php - About 1 hr to fix

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

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

    public static function countNetAppsByClassGender($term, $class = null, $gender = null)
    {
        $term_year = Term::getTermYear($term);

        $query = "SELECT count(*) from hms_new_application JOIN hms_lottery_application ON hms_new_application.id = hms_lottery_application.id
Severity: Minor
Found in class/LotteryProcess.php - About 1 hr to fix

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

    public static function sendRoomChangeCurrRDNotice(RoomChangeRequest $request)
    {
        $subject = 'Room Change Approval Required';
        $template = 'email/roomChangeCurrRDNotice.tpl';

Severity: Minor
Found in class/HMS_Email.php - About 1 hr to fix

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

    public function execute()
    {
        if (!isset($this->term) || is_null($this->term)) {
            throw new \InvalidArgumentException('Missing term.');
        }
Severity: Minor
Found in class/Report/TwentyFive/TwentyFive.php - About 1 hr to fix

Function roleMan has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

var roleMan = function(className, instance, div, name){
    this.div       = div;
    this.roles     = new Array();
    this.className = className;
    this.instance  = instance;
Severity: Minor
Found in javascript/role_editor/editor.js - About 1 hr 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

Function show has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        $this->setTitle($this->reportCtrl->getFriendlyName() . ' Detail');
        $tpl = array();

Severity: Minor
Found in class/ReportDetailView.php - About 1 hr 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

Function addUnsavedDamages has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    addUnsavedDamages(type, sideInput, noteInput){
        var options = this.state.options

        var categ = '';
        var dmgTypeDesc = '';
Severity: Minor
Found in javascript/StudentAddRoomDamages/roomDamage.jsx - About 1 hr 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

Function execute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        $term = Term::getSelectedTerm();

        $bannerId = $context->get('bannerId');
Severity: Minor
Found in class/Command/ShowCheckoutFormCommand.php - About 1 hr 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

Function execute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function execute()
    {
        // Copied and pasted from index.php
        require_once(PHPWS_SOURCE_DIR . 'mod/hms/inc/defines.php');

Severity: Minor
Found in class/ScheduledLottery.php - About 1 hr 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

Function createPlan has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function createPlan(Student $student, $term, HousingApplication $application = null, ResidenceHall $hall = null)
    {
        if($application === null){
            $planCode = MealPlan::BANNER_MEAL_STD;
        } else {
Severity: Minor
Found in class/MealPlanFactory.php - About 1 hr 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

Function getAppByStudent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getAppByStudent(Student $student, $term, $applicationType = NULL)
    {
        $db = new \PHPWS_DB('hms_new_application');
        $db->addWhere('banner_id', $student->getBannerId());
        $db->addWhere('term', $term);
Severity: Minor
Found in class/HousingApplicationFactory.php - About 1 hr 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

Function show has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        \Layout::addPageTitle("RLC Application");
        javascript('jquery');

Severity: Minor
Found in class/RlcApplicationPage1View.php - About 1 hr 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

Function deleteRoom has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function deleteRoom($roomId)
    {

        if (!\Current_User::allow('hms', 'room_structure')) {
            throw new PermissionException('You do not have permission to delete a room.');
Severity: Minor
Found in class/Room.php - About 1 hr 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

Function show has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        $tpl = array();

        $tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
Severity: Minor
Found in class/OffCampusWaitingListMenuBlockView.php - About 1 hr 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

Function show has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        $tpl = array();

        $tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
Severity: Minor
Found in class/StudentMenuProfileView.php - About 1 hr 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

Function addResponsible has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function addResponsible($residents)
    {
        $respNames = array();
        foreach ($residents as $r) {
            $respNames[$r['studentId']] = $r['name'];
Severity: Minor
Found in class/CheckoutFormView.php - About 1 hr 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

Function execute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute()
    {
        if (!isset($this->term) || is_null($this->term)) {
            throw new \InvalidArgumentException('Missing term.');
        }
Severity: Minor
Found in class/Report/TwentyFive/TwentyFive.php - About 1 hr 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

Function SourceMapConsumer_originalPositionFor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function SourceMapConsumer_originalPositionFor(aArgs) {
      var needle = {
        generatedLine: util.getArg(aArgs, 'line'),
        generatedColumn: util.getArg(aArgs, 'column')
      };
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function b64ToByteArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function b64ToByteArray (b64) {
        var i, j, l, tmp, placeHolders, arr

        if (b64.length % 4 > 0) {
            throw new Error('Invalid string. Length must be a multiple of 4')
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix
Severity
Category
Status
Source
Language