AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

Function render has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render(){
        if(this.props.roomDamages !== undefined) {
            var rows = this.props.roomDamages.map(function(node){
                return (
                    <tr key={node.id}>
Severity: Minor
Found in javascript/StudentAddRoomDamages/roomDamage.jsx - About 2 hrs to fix

Method road has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function road()
{
    $roads = array(
        'Elm',
        'Cactus',
Severity: Minor
Found in util/createfakestudents.php - About 2 hrs to fix

Method execute has 50 lines of code (exceeds 25 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 2 hrs to fix

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

    public function execute(CommandContext $context)
    {
        /*
        if(!\Current_User::allow('hms', 'email_hall') && !\Current_User::allow('hms', 'email_all')){
            throw new PermissionException('You do not have permission to send messages.');
Severity: Minor
Found in class/Command/SendNotificationEmailsCommand.php - About 2 hrs to fix

Function 8 has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"_process":8}],8:[function(_dereq_,module,exports){
// shim for using process in browser

var process = module.exports = {};
var queue = [];
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method check has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function check($term=null){
        $results = array();

        if(!isset($term)){
            $term = Term::getCurrentTerm();
Severity: Minor
Found in class/HMS_Consistancy_Checker.php - About 1 hr to fix

Method reappAvailability has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function reappAvailability()
    {
        $term = Term::getSelectedTerm();

        // Available rooms in each residence hall.
Severity: Minor
Found in class/HMS_Reports.php - About 1 hr to fix

Function SourceMapGenerator_applySourceMap has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) {
      // If aSourceFile is omitted, we will use the file property of the SourceMap
      if (!aSourceFile) {
        aSourceFile = aSourceMapConsumer.file;
      }
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function Buffer has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Buffer (subject, encoding, noZero) {
  if (!(this instanceof Buffer)) return new Buffer(subject, encoding, noZero)

  var type = typeof subject
  var length
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        // Check permissions
        if (!\Current_User::allow('hms', 'checkin')) {
            throw new PermissionException('You do not have permission to checkin students.');
Severity: Minor
Found in class/Command/ShowCheckinFormCommand.php - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        if (!UserStatus::isAdmin() || !\Current_User::allow('hms', 'assignment_maintenance')) {
            throw new PermissionException('You do not have permission to unassign students.');
        }
Severity: Minor
Found in class/Command/UnassignStudentCommand.php - About 1 hr to fix

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

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

        $errorCmd = CommandFactory::getCommand('ShowHousingApplicationForm');
Severity: Minor
Found in class/Command/HousingApplicationFormSubmitCommand.php - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        if(!\Current_User::allow('hms', 'lottery_admin')){
            throw new PermissionException('You do not have permission to administer re-application features.');
        }
Severity: Minor
Found in class/Command/CreateWaiverCommand.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 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {

        $term = $context->get('term');
        $student = StudentFactory::getStudentByUsername(UserStatus::getUsername(), $term);
Severity: Minor
Found in class/Command/SubmitRlcApplicationCommand.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 check_args has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function check_args($argc, $argv, &$args, &$switches)
{
    if($argc < count(array_keys($args)) + 1) {
        echo "USAGE: php {$argv[0]}";

Severity: Minor
Found in util/cliCommon.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 render has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    protected function render()
    {
        parent::render();

        // term

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 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute()
    {
        $term = $this->term;

        $sem = Term::getTermSem($term);
Severity: Minor
Found in class/Report/UnassignedFreshmen/UnassignedFreshmen.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 check_args has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function check_args($argc, $argv, &$args, &$switches)
{
    if($argc < count(array_keys($args)) + 1) {
        echo "USAGE: php {$argv[0]}";

Severity: Minor
Found in contrib/cliCommon.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 12 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./source-map/source-map-consumer":16,"./source-map/source-map-generator":17,"./source-map/source-node":18}],12:[function(_dereq_,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function SourceMapGenerator_serializeMappings has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function SourceMapGenerator_serializeMappings() {
      var previousGeneratedColumn = 0;
      var previousGeneratedLine = 1;
      var previousOriginalColumn = 0;
      var previousOriginalLine = 0;
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix
Severity
Category
Status
Source
Language