APO-Epsilon/apo-website

View on GitHub
service_admin_forms.php

Summary

Maintainability
C
7 hrs
Test Coverage

removeEventForm accesses the super-global variable $_SERVER.
Open

function removeEventForm(){
  include('mysql_access.php');
  echo "<h2>Remove an Event</h2>";
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
  echo "<select name=\"event\">";
Severity: Minor
Found in service_admin_forms.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

eventDetailsForm accesses the super-global variable $_SERVER.
Open

function eventDetailsForm(){
  include('mysql_access.php');
  echo "<h2>Add Event Details</h2>";

echo<<<FORM
Severity: Minor
Found in service_admin_forms.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

assignPLForm accesses the super-global variable $_SERVER.
Open

function assignPLForm(){
  include('mysql_access.php');
  echo "<h2>Assign Project Leader (Limit 1)</h2>";
  echo <<<FORM
  <form method="post" action="$_SERVER[PHP_SELF]">
Severity: Minor
Found in service_admin_forms.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

editEventForm2 accesses the super-global variable $_SERVER.
Open

function editEventForm2(){
  include('mysql_access.php');
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
  echo "<select name=\"event\">";
  $sql = "SELECT * FROM service_events ORDER BY name";
Severity: Minor
Found in service_admin_forms.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

newEventForm accesses the super-global variable $_SERVER.
Open

function newEventForm(){
echo<<<FORM
  <h2>Add an Event</h2>
  Please enter the name of the new event below:<br/>
  <form method="post" action="$_SERVER[PHP_SELF]">
Severity: Minor
Found in service_admin_forms.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

editEventForm accesses the super-global variable $_SERVER.
Open

function editEventForm(){
  include('mysql_access.php');
  echo "<h2>Edit an Event</h2>";
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
  echo "<select name=\"event\">";
Severity: Minor
Found in service_admin_forms.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

Method eventDetailsForm has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function eventDetailsForm(){
  include('mysql_access.php');
  echo "<h2>Add Event Details</h2>";

echo<<<FORM
Severity: Minor
Found in service_admin_forms.php - About 1 hr to fix

    Method assignPLForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function assignPLForm(){
      include('mysql_access.php');
      echo "<h2>Assign Project Leader (Limit 1)</h2>";
      echo <<<FORM
      <form method="post" action="$_SERVER[PHP_SELF]">
    Severity: Minor
    Found in service_admin_forms.php - About 1 hr to fix

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

        $query = $db->query($sql) or die("Error: line 24");
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("Error: line 29");
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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 unused local variables such as '$db'.
      Open

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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 assignPLForm() contains an exit expression.
      Open

        $query = $db->query($sql) or die("Error: line 24");
      Severity: Minor
      Found in service_admin_forms.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

      The function assignPLForm() contains an exit expression.
      Open

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.php by phpmd

      ExitExpression

      Since: 0.2

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

      Example

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

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

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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("Error: line 29");
      Severity: Minor
      Found in service_admin_forms.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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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 editEventForm2() contains an exit expression.
      Open

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

      The function eventDetailsForm() contains an exit expression.
      Open

        $query = $db->query($sql) or die("Error: line 29");
      Severity: Minor
      Found in service_admin_forms.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

      The function removeEventForm() contains an exit expression.
      Open

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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

      The function editEventForm() contains an exit expression.
      Open

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.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 2 locations. Consider refactoring.
      Open

      function removeEventForm(){
        include('mysql_access.php');
        echo "<h2>Remove an Event</h2>";
        echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
        echo "<select name=\"event\">";
      Severity: Major
      Found in service_admin_forms.php and 1 other location - About 2 hrs to fix
      service_admin_forms.php on lines 37..59

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

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

      function editEventForm(){
        include('mysql_access.php');
        echo "<h2>Edit an Event</h2>";
        echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
        echo "<select name=\"event\">";
      Severity: Major
      Found in service_admin_forms.php and 1 other location - About 2 hrs to fix
      service_admin_forms.php on lines 14..36

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

      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

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

        while ($r = mysqli_fetch_array($query)) {
      Severity: Minor
      Found in service_admin_forms.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($query)) {
      Severity: Minor
      Found in service_admin_forms.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($query)) {
      Severity: Minor
      Found in service_admin_forms.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($query)) {
      Severity: Minor
      Found in service_admin_forms.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($query)) {
      Severity: Minor
      Found in service_admin_forms.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

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

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

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

        $query = $db->query($sql) or die("Error: line 29");
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "</select><br/></td></tr>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo <<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo <<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT `id`, `firstname`, `lastname` FROM `contact_information` ORDER BY `lastname`";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

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

        echo "</select>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function editEventForm2(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

      A closing tag is not permitted at the end of a PHP file
      Open

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

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

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

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

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

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

        echo "</select>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo <<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $query = $db->query($sql) or die("Error: line 24");
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo <<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo<<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT `P_Id`, `name` FROM `service_events` ORDER BY `P_Id`";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function newEventForm(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo<<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function editEventForm(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<select name=\"event\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

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

        echo "<h2>Assign Project Leader (Limit 1)</h2>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<select name=\"event\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "</select>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

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

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

        echo "<select name=\"event\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<h2>Edit an Event</h2>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo<<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

          echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "</select>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

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

          echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "</select>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

          echo "<option value='$r[P_Id]'>{$r[name]}</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

      echo <<<FORM
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<h2>Remove an Event</h2>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $query = $db->query($sql) or die("error".mysqli_error());
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function assignPLForm(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        echo "<select name=\"event\">";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT * FROM service_events ORDER BY name";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

      Opening brace should be on a new line
      Open

      function eventDetailsForm(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

          echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

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

      Opening brace should be on a new line
      Open

      function removeEventForm(){
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

        $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

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

        echo "<h2>Add Event Details</h2>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

          echo "<option value='$r[P_Id]'>$r[name]</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

          echo "<option value='$r[id]'>$r[lastname], $r[firstname]</option>";
      Severity: Minor
      Found in service_admin_forms.php by phpcodesniffer

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

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

      There are no issues that match your filters.

      Category
      Status