AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

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

$.fn.selectOptions = function(value, clear)
{
    var v = value;
    var vT = typeof(value);
    // handle arrays
Severity: Minor
Found in javascript/jquery.selectboxes.js - About 1 hr to fix

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

    function advance() {
        var ch;

        if (!state.inJSXChild) {
            skipComment();
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

},{"../src/utils":23,"esprima-fb":9}],32:[function(_dereq_,module,exports){
/**
 * Copyright 2013 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method show_verify_assignment has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        $assignment = HMS_Assignment::get_assignment($_SESSION['asu_username'], $_SESSION['application_term']);
Severity: Minor
Found in class/UI/Student_UI.php - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        // Get input
        $requestId = $context->get('requestId');

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

Method __construct has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct()
    {
        parent::__construct();
        if(UserStatus::isAdmin()){
            if(\Current_User::allow('hms', 'assignment_maintenance')){
Severity: Minor
Found in class/AssignmentMenu.php - About 1 hr to fix

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

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

        $template = new \PHPWS_Template('hms');
        $template->setFile('admin/review_hall_email.tpl');
Severity: Minor
Found in class/ReviewHallNotificationMessageView.php - About 1 hr to fix

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

    public function show(){
        \Layout::addPageTitle("RLC Application Review");

        $tags = array();

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

Method render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

      $this->tpl['TERM'] = Term::toString($this->report->getTerm());
Severity: Minor
Found in class/Report/EarlyRelease/EarlyReleaseHtmlView.php - About 1 hr to fix

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

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

        $tpl['ENTRY_TERM'] = Term::toString($this->student->getApplicationTerm());
Severity: Minor
Found in class/HousingApplicationWelcomeView.php - About 1 hr to fix

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

    public function __construct($id = 0, $term = null, $banner_id = null, $username = null, $gender = null, $student_type = null, $application_term = null,
            $cell_phone = null, $meal_plan = null, $international = null, $lifestyle_option = null, $preferred_bedtime = null, $room_condition = null, $smoking_preference = null, $rlc_interest = null){
Severity: Major
Found in class/FallApplication.php - About 1 hr to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function transitionTo(RoomChangeRequestState $toState)
    {

        // Be sure we have the latest state
        if(is_null($this->state)){
Severity: Major
Found in class/RoomChangeRequest.php and 1 other location - About 1 hr to fix
class/RoomChangeParticipant.php on lines 100..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 118.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function transitionTo(RoomChangeParticipantState $toState)
    {
        // Be sure we have the latest state
        if(is_null($this->state)){
            $this->getState();
Severity: Major
Found in class/RoomChangeParticipant.php and 1 other location - About 1 hr to fix
class/RoomChangeRequest.php on lines 113..136

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 118.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if (lookahead.type === Token.Identifier) {
            label = parseVariableIdentifier();

            if (!state.labelSet.has(label.name)) {
                throwError({}, Messages.UnknownLabel, label.name);
Severity: Major
Found in javascript/react/build/JSXTransformer.js and 1 other location - About 1 hr to fix
javascript/react/build/JSXTransformer.js on lines 7679..7685

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if (lookahead.type === Token.Identifier) {
            label = parseVariableIdentifier();

            if (!state.labelSet.has(label.name)) {
                throwError({}, Messages.UnknownLabel, label.name);
Severity: Major
Found in javascript/react/build/JSXTransformer.js and 1 other location - About 1 hr to fix
javascript/react/build/JSXTransformer.js on lines 7636..7642

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function parseBinaryExpression has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function parseBinaryExpression() {
        var expr, token, prec, previousAllowIn, stack, right, operator, left, i,
            marker, markers;

        previousAllowIn = state.allowIn;
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function advanceSlash has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function advanceSlash() {
        var prevToken,
            checkToken;
        // Using the following algorithm:
        // https://github.com/mozilla/sweet.js/wiki/design
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

    render() {
        var alert = null;
        var residentClass = 'col-sm-3 ' + ($.inArray('resident', this.state.error) !== -1 ? 'checkout-error-border' : null);
        var noteClass = 'form-control ' + ($.inArray('note', this.state.error) !== -1 ? 'checkout-error-border' : null);
        if (this.state.error.length) {
Severity: Minor
Found in javascript/CheckOut/CheckOut.jsx - About 1 hr to fix

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

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

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

    public function show()
    {
        \PHPWS_Core::initCoreClass('Form.php');
        $form = new \PHPWS_Form();

Severity: Minor
Found in class/EmergencyContactFormView.php - About 1 hr to fix
Severity
Category
Status
Source
Language