AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

Method viewByRLCExportFields has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function viewByRLCExportFields()
    {
        $row = array();

        // Get the Student object
Severity: Minor
Found in class/HMS_RLC_Application.php - About 1 hr to fix

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

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

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

Method hms_update has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function hms_update(&$content, $currentVersion)
{
    switch ($currentVersion) {
        case version_compare($currentVersion, '0.4.92', '<') :
            PHPWS_Core::initModClass('users', 'Permission.php');
Severity: Minor
Found in boost/update.php - About 1 hr to fix

Function renderJSXLiteral has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function renderJSXLiteral(object, isLast, state, start, end) {
  var lines = object.value.split(/\r\n|\n|\r/);

  if (start) {
    utils.append(start, state);
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method show has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        $assignment = HMS_Assignment::getAssignmentByBannerId($this->student->getBannerId(), $this->term);
Severity: Minor
Found in class/VerifyAssignmentView.php - About 1 hr to fix

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

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

        $sem = Term::getTermSem($term);
Severity: Minor
Found in class/Report/UnassignedStudents/UnassignedStudents.php - About 1 hr to fix

Function readObserver has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    readObserver: function (e) {
        var ob = this;

        if (!this.started && (e.which === this.track_start || e.which === this.error_start)) {
            e.stopImmediatePropagation();
Severity: Minor
Found in javascript/appCardSwipe/CardReader.js - About 1 hr to fix

Function readObserver has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    readObserver: function (e) {
        var ob = this;

        if (!this.started && (e.which === this.track_start || e.which === this.error_start)) {
            e.stopImmediatePropagation();
Severity: Minor
Found in javascript/checkinStart/CardReader.js - About 1 hr to fix

Method show has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function show()
    {
        \PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');

        $hall = new ResidenceHall($this->hallId);
Severity: Minor
Found in class/LotteryChooseFloorView.php - About 1 hr to fix

Function errorFree has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    errorFree() {
        var all_clear = true;
        var errors = [];
        let resident_selected = false;

Severity: Minor
Found in javascript/CheckOut/CheckOut.jsx - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        $request = \Server::getCurrentRequest();
        $vars = $request->getVars();
        extract($vars['vars']);
Severity: Minor
Found in class/Command/SavePulseOptionCommand.php - About 1 hr to fix

Method show has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        $tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
        $tpl['STATUS'] = "";
Severity: Minor
Found in class/RlcReapplicationMenuBlockView.php - About 1 hr to fix

Method getUnassignedFreshmenApplications has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getUnassignedFreshmenApplications($term, $gender)
    {
        $db = new PHPWS_DB('hms_new_application');
        $db->addWhere('student_type', 'F');
        $db->addWhere('term', $term);
Severity: Minor
Found in class/HousingApplication.php - About 1 hr to fix

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

    public function execute(CommandContext $context){
        $errorCmd = CommandFactory::getCommand('ShowStudentMenu');

        $term = $context->get('term');
        $student = StudentFactory::getStudentByUsername(UserStatus::getUsername(), $term);
Severity: Minor
Found in class/Command/ShowRlcReapplicationCommand.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 14 (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/LotteryAdminSetWinnerCommand.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 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        $request = \Server::getCurrentRequest();
        $vars = $request->getVars();
        extract($vars['vars']);
Severity: Minor
Found in class/Command/SavePulseOptionCommand.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 specialInterestPager has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public static function specialInterestPager($group, $term)
    {
        $pager = new \DBPager('hms_new_application', '\Homestead\LotteryApplication');
        $pager->setModule('hms');
        $pager->addRowTags('specialInterestTags');
Severity: Minor
Found in class/LotteryApplication.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 get_assigned_to_link has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_assigned_to_link($newWindow = FALSE)
    {
        $this->loadAssignment();

        if (isset($this->_curr_assignment)) {
Severity: Minor
Found in class/Bed.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 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        require(PHPWS_SOURCE_DIR . 'mod/hms/inc/profile_options.php');

        $majors = MajorFactory::getMajorsList();
Severity: Minor
Found in class/RoommateProfileView.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 copy has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function copy($to_term, $hall_id, $assignments = false, $roles = false)
    {
        if(!$this->id) {
            return false;
        }
Severity: Minor
Found in class/Floor.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

Severity
Category
Status
Source
Language