APO-Epsilon/apo-website

View on GitHub

Showing 167 of 11,898 total issues

Avoid too many return statements within this function.
Open

      return el.show();
Severity: Major
Found in r8conf2016/js/foundation/foundation.reveal.js - About 30 mins to fix

    Function option has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function option($occurrence_id, $driveCount){
            include('mysql_access.php');
            $return = "";
              for($u = 0; $u <= 6; $u++){
                if($u==$driveCount){
    Severity: Minor
    Found in service_signup.php - About 25 mins 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 list_hours has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function list_hours($user_id) {
      include ('mysql_access.php');
      $sql = "SELECT * FROM `recorded_hours` WHERE `user_id` = $user_id ORDER BY `year` DESC, `month` DESC, `day` DESC";
      $results = $db->query($sql) or die("Error - Contact Webmaster");
      echo "<div style='margin: 0px auto; width: 100%; text-align: center;'>
    Severity: Minor
    Found in check_hours.php - About 25 mins 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_active has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function show_active() {
        include('mysql_access.php');
        include('retrieve_user.php');
        $user_id = $_SESSION['sessionID'];    
    
    Severity: Minor
    Found in enter_excuse.php - About 25 mins 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 page_header has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function page_header() {
    
        // Evil code to force memembers to update their information each new semester.
        // Seriously, evil.  You cannot do anything until you update.
        // -- Stephen Quinn
    Severity: Minor
    Found in r8conf2016/session.php - About 25 mins 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 page_header has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function page_header() {
        // Evil code to force memembers to update their information each new semester.
        // Seriously, evil.  You cannot do anything until you update.
        // -- Stephen Quinn
     global $current_semester;
    Severity: Minor
    Found in session.php - About 25 mins 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 encode64 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function encode64($input, $count)
    {
      $output = '';
      $i = 0;
      do {
    Severity: Minor
    Found in PasswordHash.php - About 25 mins 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