APO-Epsilon/apo-website

View on GitHub
membership.php

Summary

Maintainability
F
3 days
Test Coverage

show_active accesses the super-global variable $_SESSION.
Open

function show_active() {
      $user_id = $_SESSION['sessionID'];
      include('mysql_access.php');
      $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
      $result=mysqli_fetch_array($response);
Severity: Minor
Found in membership.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

show_active accesses the super-global variable $_POST.
Open

function show_active() {
      $user_id = $_SESSION['sessionID'];
      include('mysql_access.php');
      $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
      $result=mysqli_fetch_array($response);
Severity: Minor
Found in membership.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

show_active accesses the super-global variable $_POST.
Open

function show_active() {
      $user_id = $_SESSION['sessionID'];
      include('mysql_access.php');
      $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
      $result=mysqli_fetch_array($response);
Severity: Minor
Found in membership.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

Function display has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
Open

function display($group) {
    if($group == 'All (sorted)') 
    {
        echo '<h2>Active Members</h2>';
        display_active_members();
Severity: Minor
Found in membership.php - About 1 day 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

Method display has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function display($group) {
    if($group == 'All (sorted)') 
    {
        echo '<h2>Active Members</h2>';
        display_active_members();
Severity: Major
Found in membership.php - About 2 hrs to fix

    Method show_active has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function show_active() {
          $user_id = $_SESSION['sessionID'];
          include('mysql_access.php');
          $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
          $result=mysqli_fetch_array($response);
    Severity: Minor
    Found in membership.php - About 1 hr to fix

      The function display() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
      Open

      function display($group) {
          if($group == 'All (sorted)') 
          {
              echo '<h2>Active Members</h2>';
              display_active_members();
      Severity: Minor
      Found in membership.php by phpmd

      CyclomaticComplexity

      Since: 0.1

      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

      Example

      // Cyclomatic Complexity = 11
      class Foo {
      1   public function example() {
      2       if ($a == $b) {
      3           if ($a1 == $b1) {
                      fiddle();
      4           } elseif ($a2 == $b2) {
                      fiddle();
                  } else {
                      fiddle();
                  }
      5       } elseif ($c == $d) {
      6           while ($c == $d) {
                      fiddle();
                  }
      7        } elseif ($e == $f) {
      8           for ($n = 0; $n < $h; $n++) {
                      fiddle();
                  }
              } else {
                  switch ($z) {
      9               case 1:
                          fiddle();
                          break;
      10              case 2:
                          fiddle();
                          break;
      11              case 3:
                          fiddle();
                          break;
                      default:
                          fiddle();
                          break;
                  }
              }
          }
      }

      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

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

            $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'inactive' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Pledge' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Associate' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Senior' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Elected' OR status = 'Appointed' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Alumni' ORDER BY lastname");
      Severity: Minor
      Found in membership.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 show_active uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

            else{
              echo '<h2>You cannot see this page.</h2>';
            }
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Associate' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Pledge' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
      Severity: Minor
      Found in membership.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

            $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'inactive' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Alumni' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Senior' ORDER BY lastname");
      Severity: Minor
      Found in membership.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

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Elected' OR status = 'Appointed' ORDER BY lastname");
      Severity: Minor
      Found in membership.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=mysqli_fetch_array($response);
      Severity: Minor
      Found in membership.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 7 locations. Consider refactoring.
      Open

      function display_pledge_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Pledge' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 149..160
      membership.php on lines 161..172
      membership.php on lines 173..184
      membership.php on lines 185..196
      membership.php on lines 209..220

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

      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

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

      function display_all_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 149..160
      membership.php on lines 161..172
      membership.php on lines 173..184
      membership.php on lines 185..196
      membership.php on lines 197..208
      membership.php on lines 209..220

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

      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

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

      function display_senior_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Senior' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 149..160
      membership.php on lines 161..172
      membership.php on lines 173..184
      membership.php on lines 185..196
      membership.php on lines 197..208

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

      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

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

      function display_associate_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Associate' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 149..160
      membership.php on lines 173..184
      membership.php on lines 185..196
      membership.php on lines 197..208
      membership.php on lines 209..220

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

      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

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

      function display_exec_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Elected' OR status = 'Appointed' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 149..160
      membership.php on lines 161..172
      membership.php on lines 185..196
      membership.php on lines 197..208
      membership.php on lines 209..220

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

      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

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

      function display_inactive_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'inactive' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 149..160
      membership.php on lines 161..172
      membership.php on lines 173..184
      membership.php on lines 197..208
      membership.php on lines 209..220

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

      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

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

      function display_alumni_members() {
          $count = 0;
          include('mysql_access.php');
          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Alumni' ORDER BY lastname");
          echo '<table>';
      Severity: Major
      Found in membership.php and 6 other locations - About 2 hrs to fix
      membership.php on lines 137..148
      membership.php on lines 161..172
      membership.php on lines 173..184
      membership.php on lines 185..196
      membership.php on lines 197..208
      membership.php on lines 209..220

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

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

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

      TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
      Open

      $public_page = False;
      Severity: Minor
      Found in membership.php by phpcodesniffer

      TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
      Open

      $exec_page = False;
      Severity: Minor
      Found in membership.php by phpcodesniffer

      TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
      Open

      $active_page = True;
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Senior Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Alumni Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_senior_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if ($group == 'Pledge')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_associate_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if ($group == 'Inactive')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if ($group == 'Senior')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_senior_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 0 spaces before closing bracket; 1 found
      Open

            if ( ($result['status'] == 'Active') || ($result['status'] == 'Elected') || ($result['status'] == 'Appointed') ) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_pledge_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if ($group == 'Alumni')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_exec_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Associate Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_active_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_alumni_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_pledge_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Inactive Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if ($group == 'Associate')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Exec Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              echo '<h2>Pledge Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_associate_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          else if($group == 'Exec') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

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

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_inactive_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              display_inactive_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used for alignment; tabs are not allowed
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $page = $_POST['page'];
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

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

      Spaces must be used to indent lines; tabs are not allowed
      Open

            if (true) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="All" selected>--</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $page = null;
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="All (sorted)">All (by status)</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="All (unsorted)">All (alphabetical)</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              ?>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  <select name="page" onchange="this.form.submit()">
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  <p> Choose a group: </p>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              //sets event info section from selection
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Active">Active</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Pledge">Pledge</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

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

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

      Spaces must be used to indent lines; tabs are not allowed
      Open

              <form name="myform" action="" method="post">
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          if($group == 'All (sorted)') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Associate">Associate</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Inactive">Inactive</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Alumni">Alumni</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_associate_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              </form>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_inactive_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Alumni Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>All Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Exec">Exec</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Senior Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Active Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Associate Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

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

      Spaces must be used to indent lines; tabs are not allowed
      Open

          else if ($group == 'All (unsorted)')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_all_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  </select>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_alumni_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      <option value="Senior">Senior</option>
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_pledge_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          else if ($group == 'Active')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Active Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display($page);
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              display_senior_members();
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Inactive Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              echo '<h2>Pledge Members</h2>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 129 characters
      Open

          $response=$db->query("SELECT * FROM contact_information WHERE status = 'Elected' OR status = 'Appointed' ORDER BY lastname");
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line exceeds 120 characters; contains 223 characters
      Open

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 6
      Open

            if (true) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Space before opening parenthesis of function call prohibited
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after IF keyword; 0 found
      Open

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

      Space before opening parenthesis of function call prohibited
      Open

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

      Opening brace should be on a new line
      Open

      function show_active() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 6
      Open

            }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

            }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

            else{
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 7
      Open

          if($group == 'All (sorted)') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              display_senior_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          else if($group == 'Exec') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Associate')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

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

              echo '<tr><td>' . $count . '</td><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email']. '</td><td>' . $result['position'] . '</td></tr>';
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display_all_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Opening brace should be on a new line
      Open

      function display_inactive_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after IF keyword; 0 found
      Open

          if($group == 'All (sorted)') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 6
      Open

            }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Opening brace should be on a new line
      Open

      function display_exec_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Senior')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              display_pledge_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

          else if($group == 'Exec') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

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

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              display_active_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Associate')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if($group == 'Exec') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display_associate_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 6
      Open

            }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Pledge')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Pledge')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Inactive')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 6
      Open

            if ( ($result['status'] == 'Active') || ($result['status'] == 'Elected') || ($result['status'] == 'Appointed') ) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'All (unsorted)')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'All (unsorted)')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 0 spaces after opening bracket; 1 found
      Open

            if ( ($result['status'] == 'Active') || ($result['status'] == 'Elected') || ($result['status'] == 'Appointed') ) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 6
      Open

            else{
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Inactive')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Alumni')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display_alumni_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display($group) {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Active')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 6
      Open

          else if ($group == 'Senior')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display_active_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

          if($group == 'All (sorted)') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing brace; newline found
      Open

          }
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Active')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              display_associate_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              display_inactive_members();        
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          else if ($group == 'Alumni')
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 7
      Open

          else if($group == 'Exec') 
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Opening brace should be on a new line
      Open

      function display_senior_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function display_pledge_members() {
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Whitespace found at end of line
      Open

              $count++;  
      Severity: Minor
      Found in membership.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

      The variable $user_id is not named in camelCase.
      Open

      function show_active() {
            $user_id = $_SESSION['sessionID'];
            include('mysql_access.php');
            $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
            $result=mysqli_fetch_array($response);
      Severity: Minor
      Found in membership.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 show_active() {
            $user_id = $_SESSION['sessionID'];
            include('mysql_access.php');
            $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
            $result=mysqli_fetch_array($response);
      Severity: Minor
      Found in membership.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