APO-Epsilon/apo-website

View on GitHub
check_all_hours.php

Summary

Maintainability
B
5 hrs
Test Coverage

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

function check_hours() {
  include ('mysql_access.php');
  //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
  //$users = $db->query($sql);
Severity: Major
Found in check_all_hours.php - About 2 hrs to fix

    Function check_hours has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.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

    Avoid using undefined variables such as '$db' which will lead to PHP notices.
    Open

      $data = $db->query($sql);
    Severity: Minor
    Found in check_all_hours.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    The method check_hours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $fundraising_color = 'red';
        }
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method check_hours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $Num_Cs_color = 'red';
        }
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method check_hours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $hours_color = 'red';
        }
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method check_hours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $Num_Cs_required = 3;
          $fundraising_required = 3;
          $hours_required = 25;
        }
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method check_hours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $requirement_color = 'rgba(182,50,38,0.9)';
        }
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid unused local variables such as '$i'.
    Open

      $i = 1;
    Severity: Minor
    Found in check_all_hours.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$db'.
    Open

      $data = $db->query($sql);
    Severity: Minor
    Found in check_all_hours.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 33 and the first side effect is on line 2.
    Open

    <?php
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Avoid variables with short names like $i. Configured minimum length is 3.
    Open

      $i = 1;
    Severity: Minor
    Found in check_all_hours.php by phpmd

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    Expected 0 spaces before closing bracket; 1 found
    Open

        if ($row['Num_Cs'] >= $Num_Cs_required ) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Blank line found at end of control structure
    Open

    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 122 characters
    Open

      //$sql = "SELECT user_id, SUM(hours) AS 'sum_hours' FROM recorded_hours WHERE event = 'Non-APO Hours' GROUP BY user_id";
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 242 characters
    Open

            <div class='info' style='display:inline-block; color: white; font-size: 2em; width: inherit; padding: .5em; font-family: Garalde; text-align: center; background: $requirement_color; border-radius: .5em;'>$row[firstname] $row[lastname]
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 139 characters
    Open

      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 140 characters
    Open

        <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;'>Cs
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    End of line character is invalid; expected "\n" but found "\r\n"
    Open

    <?php
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 143 characters
    Open

        <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;'>Total
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 142 characters
    Open

        <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;'>Fund
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 192 characters
    Open

            <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;' background-color:$fundraising_color;'>$fundraising
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 820 characters
    Open

      $sql = "SELECT id, firstname, lastname, status, IFNULL(rec_hours.sum_hours, 0) AS 'sum_hours', IFNULL(rec_hours.Num_Cs, 0) AS Num_Cs, IFNULL(rec_hours.fundraising, 0) AS 'fundraising', IFNULL(outside_hours.sum_hours, 0) AS 'out_hours' FROM  contact_information LEFT JOIN (SELECT user_id, SUM(hours) AS 'sum_hours', COUNT(DISTINCT servicetype) AS 'Num_Cs', SUM(hours*fundraising) AS 'fundraising' FROM recorded_hours GROUP BY user_id) rec_hours LEFT JOIN (SELECT user_id, SUM(hours) AS 'sum_hours' FROM recorded_hours WHERE event = 'Non-APO Hours' GROUP BY user_id) outside_hours ON rec_hours.user_id = outside_hours.user_id ON contact_information.id = rec_hours.user_id WHERE (status = 'Active' OR status = 'Pledge' OR status = 'Appointed' OR status = 'Elected' OR status = 'Associate') ORDER BY lastname, firstname;";
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 180 characters
    Open

            <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;' background-color:$hours_color;'>$hours
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 143 characters
    Open

            <div style='display:inline-block; font-size: 2em; padding: 15px; width: inherit; text-align: right; font-family: Garalde;'>$row[status]
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line exceeds 120 characters; contains 182 characters
    Open

            <div class='info' style='display:inline-block; font-size: 2em; width: 70px; padding: 15px; font-family: Garalde; text-align: center;' background: $Num_Cs_color;'>$row[Num_Cs]
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $fundraising_required = 1.5;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $Num_Cs_color = 'green';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 2
    Open

      include ('mysql_access.php');
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 2
    Open

      $i = 1;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($row['fundraising'] >= $fundraising_required) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 2
    Open

      $sql = "SELECT id, firstname, lastname, status, IFNULL(rec_hours.sum_hours, 0) AS 'sum_hours', IFNULL(rec_hours.Num_Cs, 0) AS Num_Cs, IFNULL(rec_hours.fundraising, 0) AS 'fundraising', IFNULL(outside_hours.sum_hours, 0) AS 'out_hours' FROM  contact_information LEFT JOIN (SELECT user_id, SUM(hours) AS 'sum_hours', COUNT(DISTINCT servicetype) AS 'Num_Cs', SUM(hours*fundraising) AS 'fundraising' FROM recorded_hours GROUP BY user_id) rec_hours LEFT JOIN (SELECT user_id, SUM(hours) AS 'sum_hours' FROM recorded_hours WHERE event = 'Non-APO Hours' GROUP BY user_id) outside_hours ON rec_hours.user_id = outside_hours.user_id ON contact_information.id = rec_hours.user_id WHERE (status = 'Active' OR status = 'Pledge' OR status = 'Appointed' OR status = 'Elected' OR status = 'Associate') ORDER BY lastname, firstname;";
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if (($Num_Cs_color == 'green') && ($fundraising_color == 'green') && ($hours_color == 'green')) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function check_hours() {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

      include ('mysql_access.php');
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($row['status'] == 'Associate') {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $Num_Cs_required = 3;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $fundraising_color = 'green';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 12 spaces, found 4
    Open

        $i += 1;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      while($row = mysqli_fetch_array($data)) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $Num_Cs_required = 2;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 2
    Open

      $data = $db->query($sql);
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $Num_Cs_color = 'red';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $requirement_color = 'rgba(182,50,38,0.9)';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $hours_color = 'red';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 0 spaces, found 2
    Open

      } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($row['sum_hours'] >= $hours_required) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

    require_once ('session.php');
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $hours_required = 25;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $requirement_color = 'rgba(70,173,102,0.9)';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function check_hours() {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($row['Num_Cs'] >= $Num_Cs_required ) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Closing brace indented incorrectly; expected 0 spaces, found 2
    Open

      } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

    require_once ('mysql_access.php');
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $hours_required = 12.5;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 4 spaces, found 0
    Open

    $result = '';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Expected 1 space after WHILE keyword; 0 found
    Open

      while($row = mysqli_fetch_array($data)) {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $fundraising_color = 'red';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 12 spaces, found 4
    Open

        $fundraising = round($row['fundraising'], 2);
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 2
    Open

      echo<<<END
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $fundraising_required = 3;
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 12 spaces, found 4
    Open

        $hours = round($row['sum_hours'], 2);
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 4 spaces, found 0
    Open

    page_header();
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 4 spaces, found 2
    Open

      check_hours();
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } else {
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 6
    Open

          $hours_color = 'green';
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected at least 12 spaces, found 4
    Open

        echo<<<END
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    Line indented incorrectly; expected 0 spaces, found 2
    Open

      }
    Severity: Minor
    Found in check_all_hours.php by phpcodesniffer

    The variable $Num_Cs_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $requirement_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $requirement_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $requirement_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $hours_color is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Num_Cs_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $fundraising_required is not named in camelCase.
    Open

    function check_hours() {
      include ('mysql_access.php');
      //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
      //$users = $db->query($sql);
    
    Severity: Minor
    Found in check_all_hours.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status