APO-Epsilon/apo-website

View on GitHub
member_statuses.php

Summary

Maintainability
A
2 hrs
Test Coverage

process_input accesses the super-global variable $_POST.
Open

function process_input() {
  foreach ($_POST['member'] as $member_id => $member) {
    process_user($member, $member_id);
    remove_user();
  }
Severity: Minor
Found in member_statuses.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method list_members_status_form has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function list_members_status_form($sql, $positions_options) {
  include ('mysql_access.php');

  $result = $db->query($sql) or exit("Error");

Severity: Minor
Found in member_statuses.php - About 1 hr to fix

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

      $result = $db->query($sql) or exit("Error");
    Severity: Minor
    Found in member_statuses.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

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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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

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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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

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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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 list_members_status_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
          $is_exec = "";
          $is_not_exec = "CHECKED";
        }
    Severity: Minor
    Found in member_statuses.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 '$db'.
    Open

      $result = $db->query($sql) or exit("Error");
    Severity: Minor
    Found in member_statuses.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

    The function list_members_status_form() contains an exit expression.
    Open

      $result = $db->query($sql) or exit("Error");
    Severity: Minor
    Found in member_statuses.php by phpmd

    ExitExpression

    Since: 0.2

    An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

    Example

    class Foo {
        public function bar($param)  {
            if ($param === 42) {
                exit(23);
            }
        }
    }

    Source https://phpmd.org/rules/design.html#exitexpression

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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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 '$result'.
    Open

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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 '$result'.
    Open

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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

      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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

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

      if ($filter == 'Actives') {
        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Active' ORDER BY `lastname`";
      } elseif ($filter == 'Inactives') {
        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Inactive' ORDER BY `lastname`";
      } elseif ($filter == 'board') {
    Severity: Minor
    Found in member_statuses.php and 1 other location - About 30 mins to fix
    attendance_admin.php on lines 222..236

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

    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

    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 22 and the first side effect is on line 2.
    Open

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

    The parameter $user_id is not named in camelCase.
    Open

    function process_user($member, $user_id) {
      include ('mysql_access.php');
      $sql = "UPDATE `contact_information` SET `status` = '$member[status]', `position` = '$member[position]', `exec` = '$member[exec_access]' WHERE `id` = '$user_id' LIMIT 1";
      //echo $sql . "<br/>";
      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The parameter $positions_options is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    Expected 0 spaces before closing bracket; 1 found
    Open

        if ($row['exec'] == 1 ) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line exceeds 120 characters; contains 172 characters
    Open

      $sql = "UPDATE `contact_information` SET `status` = '$member[status]', `position` = '$member[position]', `exec` = '$member[exec_access]' WHERE `id` = '$user_id' LIMIT 1";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line exceeds 120 characters; contains 122 characters
    Open

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Elected' OR `status` = 'Appointed' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line exceeds 120 characters; contains 123 characters
    Open

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Pledge' OR `status` = 'Pledge Exec' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

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

      $result = $db->query($sql) or exit("Error");
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

          $is_not_exec = "";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

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

          $is_not_exec = "CHECKED";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

    Space before opening parenthesis of function call prohibited
    Open

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

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($row['exec'] == 1 ) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

          $is_exec = "CHECKED";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

    Line indented incorrectly; expected 12 spaces, found 4
    Open

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function list_members_status_form($sql, $positions_options) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

          $is_exec = "";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

    Opening brace should be on a new line
    Open

    function list_members_status_form($sql, $positions_options) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function get_positions() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function remove_user() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function process_input() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

    echo "<br>";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      if ($filter == 'Actives') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `exec` = '1' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

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

      $positions_options = "";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE status != 'Active' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function get_positions() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

      $sql = "SELECT `position` FROM `positions`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    if ($_SESSION['sessionexec'] != 1) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }elseif ($filter == 'all') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

      die(Error);
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

      $sql = "UPDATE `contact_information` SET `status` = '$member[status]', `position` = '$member[position]', `exec` = '$member[exec_access]' WHERE `id` = '$user_id' LIMIT 1";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    if (isset($_GET['filter'])) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Active' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      } elseif ($filter == 'poor_standing') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $positions_options = $positions_options . "<option>$row[position]</option>";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

      return $positions_options;
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

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

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

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

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

      $filter = $_GET['filter'];
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Expected 1 space after closing brace; 0 found
    Open

      }elseif ($filter == 'all') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'poor_standing'";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

      process_input();
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

    $positions_options = get_positions();
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

    Space before opening parenthesis of function call prohibited
    Open

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      } elseif ($filter == 'Inactives') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    function process_user($member, $user_id) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      foreach ($_POST['member'] as $member_id => $member) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        remove_user();
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      } elseif ($filter == 'exec') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function remove_user() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        process_user($member, $member_id);
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Inactive' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Pledge' OR `status` = 'Pledge Exec' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

      $sql = "DELETE FROM `apo`.`contact_information` WHERE `contact_information`.`status` = 'REMOVE'";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function process_input() {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `status` = 'Elected' OR `status` = 'Appointed' ORDER BY `lastname`";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function process_user($member, $user_id) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      } elseif ($filter == 'pledge') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

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

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

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

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

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

    echo "<div class='row'>";
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    if (isset($_POST['submitted'])) {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      } elseif ($filter == 'board') {
    Severity: Minor
    Found in member_statuses.php by phpcodesniffer

    The variable $is_not_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $member_id is not named in camelCase.
    Open

    function process_input() {
      foreach ($_POST['member'] as $member_id => $member) {
        process_user($member, $member_id);
        remove_user();
      }
    Severity: Minor
    Found in member_statuses.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 $member_id is not named in camelCase.
    Open

    function process_input() {
      foreach ($_POST['member'] as $member_id => $member) {
        process_user($member, $member_id);
        remove_user();
      }
    Severity: Minor
    Found in member_statuses.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 $is_not_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $is_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $positions_options is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $is_not_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $is_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $positions_options is not named in camelCase.
    Open

    function get_positions() {
      include ('mysql_access.php');
      $sql = "SELECT `position` FROM `positions`";
      $result = $db->query($sql);
    
    
    Severity: Minor
    Found in member_statuses.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 $positions_options is not named in camelCase.
    Open

    function get_positions() {
      include ('mysql_access.php');
      $sql = "SELECT `position` FROM `positions`";
      $result = $db->query($sql);
    
    
    Severity: Minor
    Found in member_statuses.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 $positions_options is not named in camelCase.
    Open

    function get_positions() {
      include ('mysql_access.php');
      $sql = "SELECT `position` FROM `positions`";
      $result = $db->query($sql);
    
    
    Severity: Minor
    Found in member_statuses.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 $is_exec is not named in camelCase.
    Open

    function list_members_status_form($sql, $positions_options) {
      include ('mysql_access.php');
    
      $result = $db->query($sql) or exit("Error");
    
    
    Severity: Minor
    Found in member_statuses.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 $positions_options is not named in camelCase.
    Open

    function get_positions() {
      include ('mysql_access.php');
      $sql = "SELECT `position` FROM `positions`";
      $result = $db->query($sql);
    
    
    Severity: Minor
    Found in member_statuses.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 $user_id is not named in camelCase.
    Open

    function process_user($member, $user_id) {
      include ('mysql_access.php');
      $sql = "UPDATE `contact_information` SET `status` = '$member[status]', `position` = '$member[position]', `exec` = '$member[exec_access]' WHERE `id` = '$user_id' LIMIT 1";
      //echo $sql . "<br/>";
      $result = $db->query($sql);
    Severity: Minor
    Found in member_statuses.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