AppStateESS/homestead

View on GitHub

Showing 1,397 of 1,397 total issues

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

    public function execute(CommandContext $context){

        $term = Term::getCurrentTerm();

        // Get the list of role memberships this user has
Severity: Minor
Found in class/Command/ShowRDRoomChangeListCommand.php - About 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function execute(CommandContext $context)
    {
        if( !\Current_User::allow('hms', 'room_attributes') ){
            throw new PermissionException('You do not have permission to edit rooms.');
        }
Severity: Minor
Found in class/Command/EditRoomCommand.php - About 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

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

        if (empty($this->housingApps)) {
Severity: Minor
Found in class/ProfileHousingAppList.php - About 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function show()
    {
        $floor  = new Floor($this->floorId);

        $tpl = array();
Severity: Minor
Found in class/LotteryChooseRoomView.php - About 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function copy($to_term, $room_id, $assignments)
    {
        if (!$this->id) {
            return false;
        }
Severity: Minor
Found in class/Bed.php - About 2 hrs 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 20 (exceeds 5 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 2 hrs 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 autoassign has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function autoassign()
    {
        echo "Apps:  " . count($this->applications) . "\n";
        echo "Pairs: " . count($this->pairs) . "\n";

Severity: Minor
Found in class/Autoassigner.php - About 2 hrs 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 increment has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function increment()
    {

        if($this->bedtime < 2) {
            $this->bedtime = 2;
Severity: Minor
Found in class/PreferenceValues.php - About 2 hrs 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 20 (exceeds 5 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 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

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

        $submitCmd = CommandFactory::getCommand('LotteryConfirm');
Severity: Minor
Found in class/LotteryConfirmView.php - About 2 hrs 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 removeOption has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.removeOption = function()
{
    var a = arguments;
    if(a.length == 0) return this;
    var ta = typeof(a[0]);
Severity: Major
Found in javascript/jquery.selectboxes.js - About 2 hrs to fix

Function parseMethodDefinition has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function parseMethodDefinition(key, isStatic, generator, computed) {
        var token, param, propType,
            isAsync, typeParameters, tokenValue, returnType;

        propType = isStatic ? ClassPropertyType["static"] : ClassPropertyType.prototype;
Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 2 hrs to fix

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

    public function execute(CommandContext $context)
    {
        // TODO Use the HousingApplicationFactory class to get all this data

        $term = $context->get('term');
Severity: Major
Found in class/Command/ReApplicationFormSaveCommand.php - About 2 hrs to fix

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

    public function show()
    {
        $_SESSION['profile_search_use_session'] = FALSE;
        require_once(PHPWS_SOURCE_DIR . 'mod/hms/inc/profile_options.php');

Severity: Major
Found in class/RoommateProfileSearchForm.php - About 2 hrs to fix

Function parseFunctionDeclaration has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function parseFunctionDeclaration() {
        var id, body, token, tmp, firstRestricted, message, generator, isAsync,
            previousStrict, previousYieldAllowed, previousAwaitAllowed,
            marker = markerCreate(), typeParameters;

Severity: Major
Found in javascript/react/build/JSXTransformer.js - About 2 hrs to fix

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

    public function execute(CommandContext $context)
    {
        if( !\Current_User::allow('hms', 'room_attributes') ){
            throw new PermissionException('You do not have permission to edit rooms.');
        }
Severity: Major
Found in class/Command/EditRoomCommand.php - About 2 hrs to fix

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

    public function execute(CommandContext $context){
        $currentTerm = Term::getCurrentTerm();
        $username = UserStatus::getUsername();

        # Create a contact form command, redirect to it in case of error.
Severity: Major
Found in class/Command/ShowStudentMenuCommand.php - About 2 hrs to fix

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

    public function show()
    {
        javascript('jquery');
        javascript('jquery_ui');

Severity: Major
Found in class/ReApplicationFormView.php - About 2 hrs to fix

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

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

        $this->tpl['TERM'] = Term::toString($this->report->getTerm());
Severity: Major
Found in class/Report/UnavailableBeds/UnavailableBedsHtmlView.php - About 2 hrs to fix

LotteryApplication has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class LotteryApplication extends HousingApplication {

    public $magic_winner        = 0;
    public $invited_on          = NULL;

Severity: Minor
Found in class/LotteryApplication.php - About 2 hrs to fix
Severity
Category
Status
Source
Language