APO-Epsilon/apo-website

View on GitHub
service_admin_functions.php

Summary

Maintainability
A
3 hrs
Test Coverage

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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

assignPL accesses the super-global variable $_POST.
Open

function assignPL(){
  include('mysql_access.php');
  //the new PL's id #
  $id = $_POST['user_id'];
  //the event id #
Severity: Minor
Found in service_admin_functions.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

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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

modifyEvent accesses the super-global variable $_SERVER.
Open

function modifyEvent($detail_id){
  include('mysql_access.php');

  $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
        d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
Severity: Minor
Found in service_admin_functions.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

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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

newEvent accesses the super-global variable $_POST.
Open

function newEvent(){
  include('mysql_access.php');
  //new project name
  $eventName = $_POST['projectName'];
  //insert the values
Severity: Minor
Found in service_admin_functions.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

modifyEvent2 accesses the super-global variable $_SERVER.
Open

function modifyEvent2($P_Id){
  include('mysql_access.php');

  $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
  $query = $db->query($sql) or die("error".mysqli_error().$sql);
Severity: Minor
Found in service_admin_functions.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

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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

assignPL accesses the super-global variable $_POST.
Open

function assignPL(){
  include('mysql_access.php');
  //the new PL's id #
  $id = $_POST['user_id'];
  //the event id #
Severity: Minor
Found in service_admin_functions.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

eventDetails accesses the super-global variable $_POST.
Open

function eventDetails(){
  /*
   * @param event_id the id of the event master
   *     P_Id on service_events table
   * @param DOW day of the week
Severity: Minor
Found in service_admin_functions.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 displayProjectList has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function displayProjectList(){
  include('mysql_access.php');
  echo "<h2>Project Leaders</h2>";


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

    Method modifyEvent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function modifyEvent($detail_id){
      include('mysql_access.php');
    
      $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
            d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
    Severity: Minor
    Found in service_admin_functions.php - About 1 hr to fix

      Method submitModifyEvent has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function submitModifyEvent($start,$end,$max,$length,$detail_id){
      Severity: Minor
      Found in service_admin_functions.php - About 35 mins to fix

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

          $query = $db->query($sql) or die("error".mysqli_error().$sql);
        Severity: Minor
        Found in service_admin_functions.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_admin_functions.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_admin_functions.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_admin_functions.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_admin_functions.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_admin_functions.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_admin_functions.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_functions.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_admin_functions.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_admin_functions.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 displayProjectList uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

          }else{
            echo "<table border=0 class=\"displayListingTable\">";
            echo "<tr class=\"displayListing\"><td>day</td><td>event</td><td>name</td><td>start</td><td>end</td><td></td></tr>";
                while($r = mysqli_fetch_array($result)){
                  $user_id = $r['id'];
        Severity: Minor
        Found in service_admin_functions.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 eventDetails uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

          }else{
            refresh();
          }
        Severity: Minor
        Found in service_admin_functions.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 removePL uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

          }else{
            refresh();
          }
        Severity: Minor
        Found in service_admin_functions.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 removeEvent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

          }else{
            refresh();
          }
        Severity: Minor
        Found in service_admin_functions.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 newEvent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

          }else{
            refresh();
          }
        Severity: Minor
        Found in service_admin_functions.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 assignPL uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

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

        ElseExpression

        Since: 1.4.0

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

        Example

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

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

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

          $result = $db->query($sql);
        Severity: Minor
        Found in service_admin_functions.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().$sql);
        Severity: Minor
        Found in service_admin_functions.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 assignPL() contains an exit expression.
        Open

            die("something went wrong<br/>".mysqli_error()."<br/>".mysqli_errno()."<p>".$sql);
        Severity: Minor
        Found in service_admin_functions.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 '$servicetype'.
        Open

                $servicetype = $r['servicetype'];
        Severity: Minor
        Found in service_admin_functions.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_admin_functions.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_admin_functions.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_functions.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 '$length'.
        Open

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

            die("something went wrong".mysqli_error().mysqli_errno());
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        ExitExpression

        Since: 0.2

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

        Example

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

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

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

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

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

            die("something went wrong<br/>".mysqli_error()."<br/>".mysqli_errno()."<p>".$sql);
        Severity: Minor
        Found in service_admin_functions.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 displayProjectList() contains an exit expression.
        Open

            die("error");
        Severity: Minor
        Found in service_admin_functions.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 removePL() contains an exit expression.
        Open

            die("something went wrong".mysqli_error()."<br/>");
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent2() contains an exit expression.
        Open

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

                $DOW = date('w', strtotime($r['DOW']));
        Severity: Minor
        Found in service_admin_functions.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_admin_functions.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 removeEvent() contains an exit expression.
        Open

            die("something went wrong".mysqli_error()."<br/>");
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent() contains an exit expression.
        Open

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

        ExitExpression

        Since: 0.2

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

        Example

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

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

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

          $result = $db->query($sql);
        Severity: Minor
        Found in service_admin_functions.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 variables with short names like $P. Configured minimum length is 3.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
        Severity: Minor
        Found in service_admin_functions.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 $detail_id is not named in camelCase.
        Open

        function modifyEvent($detail_id){
          include('mysql_access.php');
        
          $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
                d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
        Severity: Minor
        Found in service_admin_functions.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 $n. Configured minimum length is 3.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
        Severity: Minor
        Found in service_admin_functions.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 $P is not named in camelCase.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
          include('mysql_access.php');
          $sql = "UPDATE service_events SET description = '".$d."', location = '".$l."', notes = '".$n."' WHERE P_Id = ".$P."";
          $result = $db->query($sql);
          if($result){
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

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

        Source

        The parameter $P_Id is not named in camelCase.
        Open

        function modifyEvent2($P_Id){
          include('mysql_access.php');
        
          $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
          $query = $db->query($sql) or die("error".mysqli_error().$sql);
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

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

        Source

        The parameter $detail_id is not named in camelCase.
        Open

        function removeEvent($detail_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_details
              WHERE detail_id = $detail_id LIMIT 1";
          $result = $db->query($sql);
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

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

        Source

        The parameter $detail_id is not named in camelCase.
        Open

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
          include('mysql_access.php');
          $sql = "UPDATE service_details SET start='".$start."',end='".$end."',length=$length,max=$max WHERE detail_id = ".$detail_id;
          $result = $db->query($sql);
          if($result){
        Severity: Minor
        Found in service_admin_functions.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 $r. Configured minimum length is 3.
        Open

          while ($r = mysqli_fetch_array($query)) {
        Severity: Minor
        Found in service_admin_functions.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 = $_POST['user_id'];
        Severity: Minor
        Found in service_admin_functions.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 $d. Configured minimum length is 3.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
        Severity: Minor
        Found in service_admin_functions.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 $detail_id is not named in camelCase.
        Open

        function removePL($detail_id, $user_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_leaders
              WHERE detail_id = $detail_id
              AND user_id = $user_id LIMIT 1";
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

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

        Source

        The parameter $user_id is not named in camelCase.
        Open

        function removePL($detail_id, $user_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_leaders
              WHERE detail_id = $detail_id
              AND user_id = $user_id LIMIT 1";
        Severity: Minor
        Found in service_admin_functions.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 $r. Configured minimum length is 3.
        Open

                while($r = mysqli_fetch_array($result)){
        Severity: Minor
        Found in service_admin_functions.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_functions.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 $l. Configured minimum length is 3.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
        Severity: Minor
        Found in service_admin_functions.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_functions.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_functions.php by phpcodesniffer

        Line exceeds 120 characters; contains 216 characters
        Open

                    echo ("<tr class=\"rowm1\"><td>$DOW</td><td>$name</td><td>$firstname $lastname</td><td>$start</td><td>$end</td><td><a href=\"service_admin.php?remove=1&d=".$detail_id."&u=".$user_id."\">X</a></td></tr>");
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line exceeds 120 characters; contains 145 characters
        Open

            <tr><td><input type='hidden' name=\"detail_id\" value={$detail_id} /><input type='submit' name=\"Navigate\" value='modifyEvent'/></td></tr>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line exceeds 120 characters; contains 126 characters
        Open

          $sql = "UPDATE service_details SET start='".$start."',end='".$end."',length=$length,max=$max WHERE detail_id = ".$detail_id;
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line exceeds 120 characters; contains 137 characters
        Open

            <tr><td><input type='hidden' name=\"P_Id\" value={$P_Id} /><input type='submit' name=\"Navigate2\" value='modifyEvent2'/></td></tr>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          $sql = "INSERT INTO `service_events` (name) VALUES ('".$eventName."')";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function newEvent(){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after closing brace; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after ELSE keyword; 0 found
        Open

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

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Opening brace should be on a new line
        Open

        function modifyEvent($detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after ELSE keyword; 0 found
        Open

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

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

            refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after ELSE keyword; 0 found
        Open

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

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

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

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

            }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

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

            die("something went wrong".mysqli_error()."<br/>");
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

          $sql = "UPDATE service_events SET description = '".$d."', location = '".$l."', notes = '".$n."' WHERE P_Id = ".$P."";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

            die("something went wrong<br/>".mysqli_error()."<br/>".mysqli_errno()."<p>".$sql);
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after IF keyword; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

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

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

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

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

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

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

          $sql = "INSERT INTO `service_details`
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 0
        Open

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

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

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

        Expected 1 space after IF keyword; 0 found
        Open

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

        Opening brace should be on a new line
        Open

        function displayProjectList(){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function removePL($detail_id, $user_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function submitModifyEvent2($d, $l, $n, $P){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function assignPL(){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

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

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing brace; 0 found
        Open

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

        Expected 1 space after ELSE keyword; 0 found
        Open

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

        Opening brace should be on a new line
        Open

        function eventDetails(){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after IF keyword; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Expected 1 space after IF keyword; 0 found
        Open

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

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

            die("something went wrong".mysqli_error()."<br/>");
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }else{
        Severity: Minor
        Found in service_admin_functions.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_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

          $sql = "UPDATE service_details SET start='".$start."',end='".$end."',length=$length,max=$max WHERE detail_id = ".$detail_id;
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after IF keyword; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function refresh(){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          echo("<meta http-equiv=\"REFRESH\" content=\"0;url=/service_admin.php\">");
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after closing brace; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 0
        Open

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

        Opening brace should be on a new line
        Open

        function modifyEvent2($P_Id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 0
        Open

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

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

            die("something went wrong".mysqli_error().mysqli_errno());
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

            die("something went wrong<br/>".mysqli_error()."<br/>".mysqli_errno()."<p>".$sql);
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after IF keyword; 0 found
        Open

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

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

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

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

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

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

            refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          $sql = "DELETE FROM service_details
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after ELSE keyword; 0 found
        Open

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

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

            refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 0
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          echo "<h2>Project Leaders</h2>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Line indented incorrectly; expected 0 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing brace; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

          $d_id = $_POST['event'];
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          $sql = "INSERT INTO `service_leaders` (`detail_id`, `user_id`) VALUES (".$d_id.",".$id.")";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

            refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, d.start, d.end, d.length, d.max,  e.name
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after closing parenthesis; found 0
        Open

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

        Expected 1 space after closing brace; 0 found
        Open

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

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

          $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Expected 1 space after closing parenthesis; found 0
        Open

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

        Expected 1 space after WHILE keyword; 0 found
        Open

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

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

                  $user_id = $r['id'];
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after closing brace; 0 found
        Open

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

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

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

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

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

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

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

        Expected 1 space after closing parenthesis; found 0
        Open

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

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

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

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 0
        Open

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

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

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

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

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

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

          $id = $_POST['user_id'];
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

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

          echo "</table>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          $eventName = $_POST['projectName'];
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

            refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

            echo "<table border=0 class=\"displayListingTable\">";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

        Expected 1 space after closing parenthesis; found 0
        Open

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

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

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

            echo "<tr class=\"displayListing\"><td>day</td><td>event</td><td>name</td><td>start</td><td>end</td><td></td></tr>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

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

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

        Expected 1 space after ELSE keyword; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

          echo "</table>";
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

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

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

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

          $sql = "DELETE FROM service_leaders
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Opening brace should be on a new line
        Open

        function removeEvent($detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Expected 1 space after IF keyword; 0 found
        Open

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

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

        Opening brace should be on a new line
        Open

        function submitModifyEvent($start,$end,$max,$length,$detail_id){
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

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

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

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

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

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

        Expected 1 space after IF keyword; 0 found
        Open

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

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

          refresh();
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        Line indented incorrectly; expected 4 spaces, found 2
        Open

          }
        Severity: Minor
        Found in service_admin_functions.php by phpcodesniffer

        The variable $P_Id is not named in camelCase.
        Open

        function modifyEvent2($P_Id){
          include('mysql_access.php');
        
          $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
          $query = $db->query($sql) or die("error".mysqli_error().$sql);
        Severity: Minor
        Found in service_admin_functions.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 removePL($detail_id, $user_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_leaders
              WHERE detail_id = $detail_id
              AND user_id = $user_id LIMIT 1";
        Severity: Minor
        Found in service_admin_functions.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 removeEvent($detail_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_details
              WHERE detail_id = $detail_id LIMIT 1";
          $result = $db->query($sql);
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent($detail_id){
          include('mysql_access.php');
        
          $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
                d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
        Severity: Minor
        Found in service_admin_functions.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 eventDetails(){
          /*
           * @param event_id the id of the event master
           *     P_Id on service_events table
           * @param DOW day of the week
        Severity: Minor
        Found in service_admin_functions.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 $P_Id is not named in camelCase.
        Open

        function modifyEvent2($P_Id){
          include('mysql_access.php');
        
          $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
          $query = $db->query($sql) or die("error".mysqli_error().$sql);
        Severity: Minor
        Found in service_admin_functions.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 $P_Id is not named in camelCase.
        Open

        function modifyEvent2($P_Id){
          include('mysql_access.php');
        
          $sql = "SELECT * FROM service_events WHERE P_Id = $P_Id";
          $query = $db->query($sql) or die("error".mysqli_error().$sql);
        Severity: Minor
        Found in service_admin_functions.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 displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.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 eventDetails(){
          /*
           * @param event_id the id of the event master
           *     P_Id on service_events table
           * @param DOW day of the week
        Severity: Minor
        Found in service_admin_functions.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 displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseVariableName

        Since: 0.2

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

        Example

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

        Source

        The variable $user_id is not named in camelCase.
        Open

        function displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseVariableName

        Since: 0.2

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

        Example

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

        Source

        The variable $user_id is not named in camelCase.
        Open

        function removePL($detail_id, $user_id){
          include('mysql_access.php');
          $sql = "DELETE FROM service_leaders
              WHERE detail_id = $detail_id
              AND user_id = $user_id LIMIT 1";
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent($detail_id){
          include('mysql_access.php');
        
          $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
                d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
        Severity: Minor
        Found in service_admin_functions.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 displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.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 eventDetails(){
          /*
           * @param event_id the id of the event master
           *     P_Id on service_events table
           * @param DOW day of the week
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent($detail_id){
          include('mysql_access.php');
        
          $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
                d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
        Severity: Minor
        Found in service_admin_functions.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 eventDetails(){
          /*
           * @param event_id the id of the event master
           *     P_Id on service_events table
           * @param DOW day of the week
        Severity: Minor
        Found in service_admin_functions.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 modifyEvent($detail_id){
          include('mysql_access.php');
        
          $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
                d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
        Severity: Minor
        Found in service_admin_functions.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 submitModifyEvent($start,$end,$max,$length,$detail_id){
          include('mysql_access.php');
          $sql = "UPDATE service_details SET start='".$start."',end='".$end."',length=$length,max=$max WHERE detail_id = ".$detail_id;
          $result = $db->query($sql);
          if($result){
        Severity: Minor
        Found in service_admin_functions.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 $d_id is not named in camelCase.
        Open

        function assignPL(){
          include('mysql_access.php');
          //the new PL's id #
          $id = $_POST['user_id'];
          //the event id #
        Severity: Minor
        Found in service_admin_functions.php by phpmd

        CamelCaseVariableName

        Since: 0.2

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

        Example

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

        Source

        The variable $user_id is not named in camelCase.
        Open

        function displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.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 $d_id is not named in camelCase.
        Open

        function assignPL(){
          include('mysql_access.php');
          //the new PL's id #
          $id = $_POST['user_id'];
          //the event id #
        Severity: Minor
        Found in service_admin_functions.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 displayProjectList(){
          include('mysql_access.php');
          echo "<h2>Project Leaders</h2>";
        
        
        
        Severity: Minor
        Found in service_admin_functions.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 $P is not named in camelCase.
        Open

        function submitModifyEvent2($d, $l, $n, $P){
          include('mysql_access.php');
          $sql = "UPDATE service_events SET description = '".$d."', location = '".$l."', notes = '".$n."' WHERE P_Id = ".$P."";
          $result = $db->query($sql);
          if($result){
        Severity: Minor
        Found in service_admin_functions.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