AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

Function getDestructuredComponents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getDestructuredComponents(node, state) {
  var tmpIndex = state.localScope.tempVarIndex;
  var components = [];
  var patternItems = getPatternItems(node);

Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method rlc_assignment_export has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function rlc_assignment_export()
    {
        if( !\Current_User::allow('hms', 'view_rlc_applications') ){
            $tpl = array();
            return \PHPWS_Template::process($tpl, 'hms', 'admin/permission_denied.tpl');
Severity: Minor
Found in class/HMS_Learning_Community.php - About 1 hr to fix

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

    public function show()
    {
        $checkin = CheckinFactory::getCheckinByBannerId($this->student->getBannerId(), $this->term);

        // If there's no fall checkin, check for a checkin in the following Spring term (could be that we're looking a student menu for Fall that shows both fall-spring assignments)
Severity: Minor
Found in class/DamageMenuBlockView.php - About 1 hr to fix

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

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

        $db = PdoFactory::getPdoInstance();

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

    public function execute()
    {
        $db = PdoFactory::getInstance()->getPdo();

        $query = 'SELECT hms_assignment.banner_id, hms_assignment.reason,
Severity: Minor
Found in class/Report/NoShowList/NoShowList.php - About 1 hr to fix

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

function visitTypeAnnotatedIdentifier(traverse, node, path, state) {
  utils.catchup(node.typeAnnotation.range[0], state);
  utils.catchupWhiteOut(node.typeAnnotation.range[1], state);
  return false;
}
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 15248..15252

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 63.

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

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

function visitTypeAnnotatedObjectOrArrayPattern(traverse, node, path, state) {
  utils.catchup(node.typeAnnotation.range[0], state);
  utils.catchupWhiteOut(node.typeAnnotation.range[1], state);
  return false;
}
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 15239..15243

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 63.

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

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

        createStringLiteralTypeAnnotation: function (token) {
            return {
                type: Syntax.StringLiteralTypeAnnotation,
                value: token.value,
                raw: source.slice(token.range[0], token.range[1])
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 4999..5005

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 63.

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

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

        createModuleSpecifier: function (token) {
            return {
                type: Syntax.ModuleSpecifier,
                value: token.value,
                raw: source.slice(token.range[0], token.range[1])
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 4495..4501

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 63.

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 containsOption has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Function runFactory has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function runFactory(id, deps, factory) {
        var r, e, m, result;

        if (id) {
            e = loaderCache[id] = {};
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function transformCode has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function transformCode(code, url, options) {
  try {
    var transformed = transformReact(code, options);
  } catch(e) {
    e.message += '\n    at ';
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Function SourceMapGenerator_fromSourceMap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
      var sourceRoot = aSourceMapConsumer.sourceRoot;
      var generator = new SourceMapGenerator({
        file: aSourceMapConsumer.file,
        sourceRoot: sourceRoot
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method execute has 34 lines of code (exceeds 25 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

Function 28 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"../src/utils":23,"./es6-rest-param-visitors":30,"./es7-rest-property-helpers":32,"./reserved-words-helper":34,"esprima-fb":9}],28:[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

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

    render(){
        var damageItems = this.state.damages.map(function(damage){
            return (
                <DamageItem key={damage.id} damage={damage} damageTypes={this.props.damageTypes} updateResponsibilityCallback={this.updateResponsibility}/>
            );
Severity: Minor
Found in javascript/damageAssessment/DamageAssessment.jsx - About 1 hr to fix

Method execute has 34 lines of code (exceeds 25 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/ShowEmergencyContactReviewCommand.php - About 1 hr to fix

Function visitSuperCallExpression has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function visitSuperCallExpression(traverse, node, path, state) {
  var superClassName = state.superClass.name;

  if (node.callee.type === Syntax.Identifier) {
    if (_isConstructorMethod(state.methodNode)) {
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

Method execute has 34 lines of code (exceeds 25 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 1 hr to fix

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

    public function execute(CommandContext $context)
    {

        $this->searchString = $context->get('studentSearchQuery'); // NB: this is the *search term*, not the semester

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