APO-Epsilon/apo-website

View on GitHub
service_signup.php

Summary

Maintainability
F
3 days
Test Coverage

remove accesses the super-global variable $_SESSION.
Open

function remove($detail, $occurrence){
  include('mysql_access.php');
  $id = $_SESSION['sessionID'];

  $sql = "DELETE FROM service_attendance WHERE detail_id = $detail AND user_id =  $id AND processed = 0";
Severity: Minor
Found in service_signup.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

register accesses the super-global variable $_SESSION.
Open

function register($detail,$occurrence){
  include('mysql_access.php');
  $id = $_SESSION['sessionID'];

  $sql = "SELECT length FROM service_details WHERE detail_id = $detail";
Severity: Minor
Found in service_signup.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

displayListing accesses the super-global variable $_SESSION.
Open

function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
Severity: Minor
Found in service_signup.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

displayListing accesses the super-global variable $_SERVER.
Open

function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
Severity: Minor
Found in service_signup.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 displayListing has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
Open

function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
Severity: Minor
Found in service_signup.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 displayListing has 193 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
Severity: Major
Found in service_signup.php - About 7 hrs to fix

    File service_signup.php has 294 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    require_once ('session.php');
    require_once ('mysql_access.php');
    ?>
    <!doctype html>
    Severity: Minor
    Found in service_signup.php - About 3 hrs to fix

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

      function option($occurrence_id, $driveCount){
              include('mysql_access.php');
              $return = "";
                for($u = 0; $u <= 6; $u++){
                  if($u==$driveCount){
      Severity: Minor
      Found in service_signup.php - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      The function displayListing() has an NPath complexity of 69126. The configured NPath complexity threshold is 200.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.php by phpmd

      NPathComplexity

      Since: 0.1

      The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

      Example

      class Foo {
          function bar() {
              // lots of complicated code
          }
      }

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

      The function displayListing() has 247 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.php by phpmd

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

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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

            $resultPLData = $db->query($sqlPLData);
      Severity: Minor
      Found in service_signup.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

            $resultUserData = $db->query($sqlUserData);
      Severity: Minor
      Found in service_signup.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 service_signup.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 service_signup.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 service_signup.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

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

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

            $resultUserData = $db->query($sqlUserData);
      Severity: Minor
      Found in service_signup.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

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

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

              }else{
                $m = 2;
                $message = "<a href=\"service_signup.php?r=$detail_id&o=$occurrence_id\" class=\"button expand\">Remove</a>";
                //$message;
              }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

            }else{
              $start = substr($start,0,-3)."am";
            }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

                  }else{
                    $s = "";
                  }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

        }else{
          $v = 1;
          while($r = mysqli_fetch_array($resultO)){
            //$user_id = $r['id'];
            $detail_id = $r['detail_id'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

        }else{
          refresh($occurrence);
        }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

            }else{
              $message = "<a href=\"#\" class=\"button alert expand\" onclick=\"return false;\">Full</a>";
              $drive = "";
            }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

        }else{
          refresh($occurrence);
        }
      Severity: Minor
      Found in service_signup.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

            }else{
              $end = substr($end,0,-3)."am";
            }
      Severity: Minor
      Found in service_signup.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 parameters such as '$occurrence_id'.
      Open

      function option($occurrence_id, $driveCount){
      Severity: Minor
      Found in service_signup.php by phpmd

      UnusedFormalParameter

      Since: 0.2

      Avoid passing parameters to methods or constructors and then not using those parameters.

      Example

      class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

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

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

            $lastname = $r['lastname'];
      Severity: Minor
      Found in service_signup.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 '$firstname'.
      Open

            $firstname = $r['firstname'];
      Severity: Minor
      Found in service_signup.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 service_signup.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 '$event_id'.
      Open

            $event_id = $r['event_id'];
      Severity: Minor
      Found in service_signup.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 displayListing() contains an exit expression.
      Open

          die("error 0");
      Severity: Minor
      Found in service_signup.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

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

            if($end > 12){
              $endstr = substr($end, 0,2);
              $endstr -= 12;
              $end = $endstr.substr($end,2,-3)."pm";
            }else{
      Severity: Major
      Found in service_signup.php and 5 other locations - About 45 mins to fix
      service_admin_week.php on lines 209..215
      service_admin_week.php on lines 216..222
      service_admin_week.php on lines 403..409
      service_admin_week.php on lines 410..416
      service_signup.php on lines 221..227

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

      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 6 locations. Consider refactoring.
      Open

            if($start > 12){
              $startstr = substr($start, 0,2);
              $startstr -= 12;
              $start = $startstr.substr($start,2,-3)."pm";
            }else{
      Severity: Major
      Found in service_signup.php and 5 other locations - About 45 mins to fix
      service_admin_week.php on lines 209..215
      service_admin_week.php on lines 216..222
      service_admin_week.php on lines 403..409
      service_admin_week.php on lines 410..416
      service_signup.php on lines 228..234

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

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

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

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

        $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

      The parameter $occurrence_id is not named in camelCase.
      Open

      function option($occurrence_id, $driveCount){
              include('mysql_access.php');
              $return = "";
                for($u = 0; $u <= 6; $u++){
                  if($u==$driveCount){
      Severity: Minor
      Found in service_signup.php 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

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

              $ph = $rw['phone'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

              $dr = $rw['drive'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

          $v = 1;
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

            while($r2 = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

              $fn = $rw['firstname'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

        $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

      while($r = mysqli_fetch_array($result)){
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

        while($r = mysqli_fetch_array($result)){
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

                    $s = "selected=\"selected\"";
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

      $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

                $m = 1;
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

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

              $ln = $rw['lastname'];
      Severity: Minor
      Found in service_signup.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

      File contains UTF-8 byte order mark, which may corrupt your application
      Open

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

      Blank line found at start of control structure
      Open

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

      Blank line found at end of control structure
      Open

      
      
      Severity: Minor
      Found in service_signup.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 service_signup.php by phpcodesniffer

      Each PHP statement must be on a line by itself
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Blank line found at end of control structure
      Open

      
      
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 127 characters
      Open

        echo "<div class=\"row\"><div class=\"small-12 columns\"><p>You need to login before you can see this page.</p></div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 165 characters
      Open

      //echo "<tr class=\"displayListing2\"><td>event name</td><td>date</td><td></td><td>start</td><td>end</td><td>current</td><td>limit</td><td>hours</td><td></td></tr>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 128 characters
      Open

            $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 189 characters
      Open

            echo "<div class=\"small-2 columns\">$DOW</div><div class=\"small-2 columns\">$theDate</div><div class=\"small-2 columns\">$start</div><div class=\"small-4 columns end\">$name</div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 128 characters
      Open

                $message = "<a href=\"service_signup.php?d=$detail_id&o=$occurrence_id\" class=\"button expand success\">Sign up</a>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 146 characters
      Open

            $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND user_id = $id AND occurrence_id = $occurrence_id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 183 characters
      Open

            //echo "<tr class=\"trNEW\"><td>$name</td><td>$DOW</td><td>$theDate</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length $v $ma</td><td>{$message}</td></tr>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 215 characters
      Open

            $sqlUserData = "SELECT s.*, c.firstname, c.lastname, phone FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 208 characters
      Open

            $sqlUserData = "SELECT s.*, c.firstname, c.lastname FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 365 characters
      Open

            echo "<div class=\"row\"><div class=\"small-4 columns\"><b>Date</b><br>$DOW<br>$theDate</div><div class=\"small-2 columns\"><b>Start</b><br>$start</div><div class=\"small-2 columns\"><b>End</b><br>$end</div><div class=\"small-2 columns text-center\"><b>Hours</b><br>$length $v</div><div class=\"small-2 columns text-center\"><b>Spots</b><br>$max</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 274 characters
      Open

            $sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line exceeds 120 characters; contains 274 characters
      Open

            $sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        echo "<div class=\"row\"><div class=\"small-12 columns\"><p>You need to login before you can see this page.</p></div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      if($datew == 6 && $dateG >= 13){//Friday
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

      if($count > 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        require_once('service_hours_logger.php');
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

      if($datew == 6 && $dateG >= 13){//Friday
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      function refresh($occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $sql = "UPDATE service_occurrence SET active = 0 WHERE theDate < DATE(NOW())";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $dateG = date('G');
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

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

      $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

      if($datew == 6 && $dateG >= 13){//Friday
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

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

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

        $count = $r['count'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after closing brace; 0 found
      Open

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

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

        $sql2 = "UPDATE service_occurrence SET active = 2 WHERE active = 4";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $datew = date('w');
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      if($count > 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

        $sql = "UPDATE service_occurrence SET active = 1 WHERE active = 3";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Space before opening parenthesis of function call prohibited
      Open

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      function register($detail,$occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function register($detail,$occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function remove($detail, $occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

          echo(mysqli_error());
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

      if(mysqli_num_rows($result)!=0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

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

          die("error 0");
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

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

          $v = 1;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $start = $r['start'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

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

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

        $sql = "SELECT length FROM service_details WHERE detail_id = $detail";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

            $DOW = $r['DOW'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $sql = "SELECT d.detail_id, d.event_id, d.DOW,
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $detail_id = $r['detail_id'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $DOW = $r['DOW'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            if(($count < $max)||($num_rows == 1)||($max==-1)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      function remove($detail, $occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function displayListing(){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $start = $r['start'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $theDate = $r['theDate'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after IF keyword; 0 found
      Open

        if(!$resultO){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

            while($r2 = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected at least 24 spaces, found 10
      Open

                $m = 2;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Space before opening parenthesis of function call prohibited
      Open

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

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

      $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE processed = 1";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

      if($count > 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

          echo("something went wrong".mysqli_error()."<br/>".$sql."<br/>Perhaps someone else signed up for the event.");
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

          refresh($occurrence);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

                $return .= "<option value=$u $s>$u</option>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

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

      echo "<h2>Currently Attending:</h2>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      echo "</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

        if(!$resultO){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

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

      Expected 1 space after closing brace; 0 found
      Open

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

      Line indented incorrectly; expected 8 spaces, found 2
      Open

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

      Line indented incorrectly; expected 12 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

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

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

            $firstname = $r['firstname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $end = $r['end'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

              if($num_rows == 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

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

        echo("<meta http-equiv=\"REFRESH\" content=\"0;url=service_signup.php#$occurrence\">");
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

          $length = $r['length'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

                for($u = 0; $u <= 6; $u++){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $name = $r['name'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $theDate = date('M-d', strtotime($theDate));
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $num_rows = $r2['count'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

              if($num_rows == 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        $sql = "INSERT INTO service_attendance (detail_id, user_id, occurrence_id, length)
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

                  if($u==$driveCount){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $id = $_SESSION['sessionID'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

      if(mysqli_num_rows($result)!=0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

            while($r = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

          refresh($occurrence);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 10
      Open

                for($u = 0; $u <= 6; $u++){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

                    $s = "";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      function displayListing(){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 0
      Open

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

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

            echo "<div class=\"small-2 columns\">$DOW</div><div class=\"small-2 columns\">$theDate</div><div class=\"small-2 columns\">$start</div><div class=\"small-4 columns end\">$name</div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

          while($r = mysqli_fetch_array($resultO)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $length = $r['length'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND user_id = $id AND occurrence_id = $occurrence_id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            while($r2 = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

              if($num_rows == 0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function option($occurrence_id, $driveCount){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Closing brace indented incorrectly; expected 10 spaces, found 8
      Open

              }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $end = $r['end'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $length = $r['length'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $max = $r['max'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            while($r = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

            if(($count < $max)||($num_rows == 1)||($max==-1)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

              }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function refresh($occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      function option($occurrence_id, $driveCount){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

                    $s = "selected=\"selected\"";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 0
      Open

      if(mysqli_num_rows($result)!=0){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $count = $r['count'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

            if(($count < $max)||($num_rows == 1)||($max==-1)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected at least 24 spaces, found 10
      Open

                $message = "<a href=\"service_signup.php?r=$detail_id&o=$occurrence_id\" class=\"button expand\">Remove</a>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Expected 1 space after IF keyword; 0 found
      Open

                  if($u==$driveCount){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

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

            $event_id = $r['event_id'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 4
      Open

          while($r = mysqli_fetch_array($resultO)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $event_id = $r['event_id'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $lastname = $r['lastname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $theDate = $r['theDate'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected at least 24 spaces, found 10
      Open

                $m = 1;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

        if(!$result){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

        $sql = "DELETE FROM service_attendance WHERE detail_id = $detail AND user_id =  $id AND processed = 0";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      echo "<div class=\"small-12 columns\">";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

            while($r2 = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected at least 24 spaces, found 10
      Open

                $message = "<a href=\"service_signup.php?d=$detail_id&o=$occurrence_id\" class=\"button expand success\">Sign up</a>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space between comma and argument "$occurrence"; 0 found
      Open

      function register($detail,$occurrence){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 8 spaces, found 2
      Open

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

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after FOR keyword; 0 found
      Open

                for($u = 0; $u <= 6; $u++){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 4 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          while($r = mysqli_fetch_array($resultO)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $occurrence_id = $r['occurrence_id'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

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

      Expected 1 space after WHILE keyword; 0 found
      Open

            while($r = mysqli_fetch_array($result2)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

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

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        if(!$resultO){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $name = $r['name'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

      No space found after comma in function call
      Open

              $endstr = substr($end, 0,2);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

            if($m!=2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

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

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

              $lname = $row['lastname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

              if($ph == ""){ $ph = "- - - - - - - - -";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

              $message = "<a href=\"#\" class=\"button alert expand\" onclick=\"return false;\">Full</a>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $drive = "";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $startstr = substr($start, 0,2);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $start = $startstr.substr($start,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

            if($end > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $end = substr($end,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $end = substr($end,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $drive = "";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $drive =
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"small-8 columns\">Project Leader: ";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"small-8 small-centered columns\">$drive</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

        register($_GET['d'],$_GET['o']);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $start = substr($start,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"small-5 columns\">";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

              if($ph == ""){ $ph = "- - - - - - - - -";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        register($_GET['d'],$_GET['o']);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $start = $startstr.substr($start,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            if($m==2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $drive = "";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $resultPLData = $db->query($sqlPLData);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

            if($m==2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $optionC = option($occurrence_id, $driveCount);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</div><div class=\"small-4 columns\">";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $fname = $row['firstname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $lname = $row['lastname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            if($start > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

              $endstr = substr($end, 0,2);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sql = "SELECT drive FROM service_attendance WHERE occurrence_id = $occurrence_id AND user_id = $id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

              echo "$phone";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $fn = $rw['firstname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $ph = $rw['phone'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

            if($start > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

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

            $sqlUserData = "SELECT s.*, c.firstname, c.lastname FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $ln = $rw['lastname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $fn = $rw['firstname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $start = substr($start,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $start = substr($start,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Line indented incorrectly; expected 16 spaces, found 10
      Open

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

      Closing brace indented incorrectly; expected 10 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              "<div class=\"row\">
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"small-12 columns\"><h2 id=\"$occurrence_id\">$name</h2></div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $phone = $row['phone'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $resultPLData = $db->query($sqlPLData);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

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

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

            echo "</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              echo "$ph <br>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "</li>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

      echo "</ul></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

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

      Expected 1 space after ELSEIF keyword; 0 found
      Open

      }elseif(isset($_GET['r'])){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

        remove($_GET['r'],$_GET['o']);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

            if($start > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

            if($m==2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sqlUserData = "SELECT s.*, c.firstname, c.lastname, phone FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

      }elseif(isset($_GET['r'])){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"small-12 columns\">";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"small-4 columns\"><b>Date</b><br>$DOW<br>$theDate</div><div class=\"small-2 columns\"><b>Start</b><br>$start</div><div class=\"small-2 columns\"><b>End</b><br>$end</div><div class=\"small-2 columns text-center\"><b>Hours</b><br>$length $v</div><div class=\"small-2 columns text-center\"><b>Spots</b><br>$max</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Newline required after opening brace
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $dr = $rw['drive'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

      }elseif(isset($_GET['r'])){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $end = $endstr.substr($end,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

                  $driveCount = $v['drive'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 4
      Open

          }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

            if($end > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

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

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            if($m!=2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $start = $startstr.substr($start,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              echo "$fname $lname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after WHILE keyword; 0 found
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Closing brace must be on a line by itself
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

            while($rw = mysqli_fetch_array($resultUserData)){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

              if($ph == ""){ $ph = "- - - - - - - - -";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Newline required after opening brace
      Open

              if($ph == ""){ $ph = "- - - - - - - - -";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $m = 0;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"medium-5 small-6 medium-offset-2 small-offset-1 columns\">";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $dr = $rw['drive'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              echo "$fn $ln {$dr}<br/>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

              if($ph == ""){ $ph = "- - - - - - - - -";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<div class=\"row\"><div class=\"small-12 columns\">{$message}</div></div>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

              $startstr = substr($start, 0,2);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $endstr -= 12;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $end = $endstr.substr($end,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

            if($m!=2){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

              $phone = $row['phone'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $resultUserData = $db->query($sqlUserData);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $ln = $rw['lastname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $optionC = "";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            echo "<li>";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $startstr -= 12;
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            if($end > 12){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $resultUserData = $db->query($sqlUserData);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      No space found after comma in function call
      Open

              $end = $endstr.substr($end,2,-3)."pm";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $end = substr($end,0,-3)."am";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

            $sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

              $fname = $row['firstname'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }elseif(isset($_GET['r'])){
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Newline required after opening brace
      Open

              if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

          $driveNum = $_POST['driveCount'];
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

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

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

      Expected 1 space after closing brace; 0 found
      Open

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

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

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

        displayListing();
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

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

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

          $sql = "UPDATE service_attendance SET drive = $driveNum WHERE occurrence_id = $occ AND user_id = $id";
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

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

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

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

      No space found after comma in function call
      Open

        remove($_GET['r'],$_GET['o']);
      Severity: Minor
      Found in service_signup.php by phpcodesniffer

      The variable $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $event_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $DOW is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $num_rows is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $DOW is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $DOW is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $num_rows is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $DOW is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $event_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $occurrence_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $num_rows is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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 $detail_id is not named in camelCase.
      Open

      function displayListing(){
      include('mysql_access.php');
      $id = $_SESSION['sessionID'];
      $sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
      FROM service_details AS d
      Severity: Minor
      Found in service_signup.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