AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

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

    public function show()
    {

        $autoassign = $this->AutoassignScheduleSet();

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

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

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

      $query = "SELECT requestor, requestee from hms_roommate
Severity: Minor
Found in class/Report/MismatchedRoommates/MismatchedRoommates.php - About 1 hr to fix

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

    public function execute()
    {
        $db = PDOFactory::getPdoInstance();

        $query = "SELECT
Severity: Minor
Found in class/Report/AssignmentsRemoved/AssignmentsRemoved.php - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        // Get input
        $requestId = $context->get('requestId');
        $participantId = $context->get('participantId');
Severity: Minor
Found in class/Command/RoomChangeStudentApproveCommand.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 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context){

        if(!UserStatus::isAdmin() || !\Current_User::allow('hms', 'roommate_maintenance')){
            throw new PermissionException('You do not have permission to create/edit roommate groups.');
        }
Severity: Minor
Found in class/Command/CreateRoommateGroupCommand.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 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        $term = $context->get('term');
        if(!isset($term)){
            throw new \InvalidArgumentException('Missing term!');
Severity: Minor
Found in class/Command/AcceptDeclineRlcInviteCommand.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 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        $newrows = array();
        $pdo = PdoFactory::getPdoInstance();
        $floor_id = (int) $context->get('floorId');
Severity: Minor
Found in class/Command/JSONGetRoomsCommand.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 addUserStatus has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private function addUserStatus()
    {
        // If the user is not logged in, then we have nothing to do here
          if(UserStatus::isGuest()){
                return;
Severity: Minor
Found in class/NavBar.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 addInfoCard has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function addInfoCard(InfoCard $infoCard)
    {
        $this->pdf->addPage();
        $this->pdf->setFont('Times', 'B', 20);

Severity: Minor
Found in class/InfoCardPdfView.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 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        $f = $this->feature;
        $reg = $f->getRegistration();

Severity: Minor
Found in class/ApplicationFeatureSettingsView.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 reinterpretAsDestructuredParameter has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function reinterpretAsDestructuredParameter(options, expr) {
        var i, len, property, element;

        if (expr.type === Syntax.ObjectExpression) {
            expr.type = Syntax.ObjectPattern;
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

    function parseDeclareModule() {
        var body = [], bodyMarker, id, idMarker, marker = markerCreate(), token;
        expectContextualKeyword('declare');
        expectContextualKeyword('module');

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

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

    function parseClassExpression() {
        var id, implemented, previousYieldAllowed, superClass = null,
            superTypeParameters, marker = markerCreate(), typeParameters,
            matchImplements;

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

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

    function getEscapedIdentifier() {
        var ch, id;

        ch = source.charCodeAt(index++);
        id = String.fromCharCode(ch);
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

    function parseVariableDeclaration(kind) {
        var id,
            marker = markerCreate(),
            init = null,
            typeAnnotationMarker = markerCreate();
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix

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

    public function execute(CommandContext $context)
    {
        $id = $context->get('roommateId');
        if(is_null($id)) {
            throw new \InvalidArgumentException('Must set roommateId');
Severity: Minor
Found in class/Command/RoommateBreakCommand.php - About 1 hr to fix

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

function visitObjectLiteralSpread(traverse, node, path, state) {
  utils.catchup(node.range[0], state);

  utils.append('Object.assign({', state);

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

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

    render(){
        //console.log(this.props.newRoomDamages)
        if(this.props.newRoomDamages.length !== 0){
            var data = this.props.newRoomDamages;
            var removeRow = this.removeRow
Severity: Minor
Found in javascript/StudentAddRoomDamages/roomDamage.jsx - About 1 hr to fix

Method execute has 35 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 assign students.');
        }

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

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

function catchup(end, state, contentTransformer) {
  if (end < state.g.position) {
    // cannot move backwards
    return;
  }
Severity: Minor
Found in javascript/react/build/JSXTransformer.js - About 1 hr to fix
Severity
Category
Status
Source
Language