AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

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

    public function execute(CommandContext $context)
    {
        if(!\Current_User::allow('hms', 'reports')){
            throw new PermissionException('You do no have permission to run reports.');
        }
Severity: Minor
Found in class/Command/ScheduleReportCommand.php - About 45 mins 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 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        $requestId = $context->get('requestId');
        
    $mealPlanCode = $context->get('mealPlan');
Severity: Minor
Found in class/Command/LotteryConfirmRoommateRequestCommand.php - About 45 mins 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 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context){
        $term = $context->get('term');

        if(!isset($term) || is_null($term) || empty($term)){
            throw new \InvalidArgumentException('Missing term.');
Severity: Minor
Found in class/Command/ShowRlcApplicationViewCommand.php - About 45 mins 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

Avoid deeply nested control flow statements.
Open

          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    switch (ch) {
                    case 'n':
                        cooked += '\n';
                        break;
                    case 'r':
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

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

    public function execute(CommandContext $context)
    {
        // Make sure we have a valid term
        $term = $context->get('term');

Severity: Minor
Found in class/Command/ShowHousingApplicationFormCommand.php - About 45 mins 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

Avoid deeply nested control flow statements.
Open

                if (tmp && tmp.type === Syntax.SpreadElement) {
                    if (!match(']')) {
                        throwError({}, Messages.ElementAfterSpreadElement);
                    }
                } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) {
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                if (ch === '\r' && source[index] === '\n') {
                    ++index;
                }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) {
                throwError({}, Messages.InvalidLHSInAssignment);
            }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    if (!checkToken) {
                        return scanRegExp();
                    }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

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

    public function __construct($roomId, $bannerId, $damageType, $checkoutId, $splitWithRoommate, $reportedBy)
Severity: Minor
Found in class/Damage.php - About 45 mins to fix

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

    public function execute(CommandContext $context)
    {
        if(!UserStatus::isAdmin() || !\Current_User::allow('hms', 'bed_structure')){
            throw new PermissionException('You do not have permission to add a bed.');
        }
Severity: Minor
Found in class/Command/AddBedCommand.php - About 45 mins 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

Avoid deeply nested control flow statements.
Open

                        if (strict && kind === PropertyKind.Data) {
                            throwErrorTolerant({}, Messages.StrictDuplicateProperty);
                        } else if (kind !== PropertyKind.Data) {
                            throwErrorTolerant({}, Messages.AccessorDataProperty);
                        }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

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

    public function execute(CommandContext $context)
    {
        if (!UserStatus::isAdmin() || !\Current_User::allow('hms', 'assign_by_floor')) {
            throw new PermissionException('You do not have permission to assign students by floor.');
        }
Severity: Minor
Found in class/Command/JSONAssignStudentCommand.php - About 45 mins 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

Avoid deeply nested control flow statements.
Open

          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    if (ch === '\r' && source[index] === '\n') {
                        ++index;
                    }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if (isOctalDigit(ch)) {
                            code = '01234567'.indexOf(ch);

                            // \0 is not octal escape sequence
                            if (code !== 0) {
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

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

    public function reportRoomAssignment($username, $term, $building, $room, $plan = 'HOME', $meal)
Severity: Minor
Found in util/SOAP.php - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if (kind === PropertyKind.Data) {
                            throwErrorTolerant({}, Messages.AccessorDataProperty);
                        } else if (storedKind & kind) {
                            throwErrorTolerant({}, Messages.AccessorGetSet);
                        }
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

        } else if (i + 1 === length) {
          // unpaired lead
          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
          continue
        } else {
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 45 mins to fix
Severity
Category
Status
Source
Language