APO-Epsilon/apo-website

View on GitHub
service_leader_functions.php

Summary

Maintainability
D
2 days
Test Coverage

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

displayView accesses the super-global variable $_GET.
Open

function displayView($i){
  include('mysql_access.php');
  $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
      e.name, d.DOW
      FROM contact_information AS c
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

processAttendance accesses the super-global variable $_SERVER.
Open

function processAttendance($d,$o){
  include('mysql_access.php');
  echo "<h1>Process Attendance</h1>";
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";

Severity: Minor
Found in service_leader_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

processNew accesses the super-global variable $_POST.
Open

function processNew(){
  include('mysql_access.php');
  $id = $_POST['user_id'];
  $hours = $_POST['hours'];
  $o = $_POST['occurrence_id'];
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

processNew accesses the super-global variable $_POST.
Open

function processNew(){
  include('mysql_access.php');
  $id = $_POST['user_id'];
  $hours = $_POST['hours'];
  $o = $_POST['occurrence_id'];
Severity: Minor
Found in service_leader_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

processNew accesses the super-global variable $_POST.
Open

function processNew(){
  include('mysql_access.php');
  $id = $_POST['user_id'];
  $hours = $_POST['hours'];
  $o = $_POST['occurrence_id'];
Severity: Minor
Found in service_leader_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

processNew accesses the super-global variable $_POST.
Open

function processNew(){
  include('mysql_access.php');
  $id = $_POST['user_id'];
  $hours = $_POST['hours'];
  $o = $_POST['occurrence_id'];
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

process_log accesses the super-global variable $_POST.
Open

function process_log(){
  include('mysql_access.php');
  if(isset($_POST['exclude'])){
    $exclude = $_POST['exclude'];//array passed to here
  }
Severity: Minor
Found in service_leader_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

displayActive accesses the super-global variable $_SESSION.
Open

function displayActive($i){
  include('mysql_access.php');

  $message = array("Past: ","Present: ","Cancelled: ");
  //echo $i;
Severity: Minor
Found in service_leader_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

displayView accesses the super-global variable $_GET.
Open

function displayView($i){
  include('mysql_access.php');
  $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
      e.name, d.DOW
      FROM contact_information AS c
Severity: Minor
Found in service_leader_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

processAttendance accesses the super-global variable $_SERVER.
Open

function processAttendance($d,$o){
  include('mysql_access.php');
  echo "<h1>Process Attendance</h1>";
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";

Severity: Minor
Found in service_leader_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 processAttendance has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function processAttendance($d,$o){
  include('mysql_access.php');
  echo "<h1>Process Attendance</h1>";
  echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";

Severity: Major
Found in service_leader_functions.php - About 3 hrs to fix

    Method displayActive has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function displayActive($i){
      include('mysql_access.php');
    
      $message = array("Past: ","Present: ","Cancelled: ");
      //echo $i;
    Severity: Major
    Found in service_leader_functions.php - About 2 hrs to fix

      File service_leader_functions.php has 253 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      function refresh(){
        echo("<meta http-equiv=\"REFRESH\" content=\"0;url=service_leader_dashboard.php\">");
      }
      Severity: Minor
      Found in service_leader_functions.php - About 2 hrs to fix

        Method process_log has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function process_log(){
          include('mysql_access.php');
          if(isset($_POST['exclude'])){
            $exclude = $_POST['exclude'];//array passed to here
          }
        Severity: Minor
        Found in service_leader_functions.php - About 1 hr to fix

          Function process_log has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

          function process_log(){
            include('mysql_access.php');
            if(isset($_POST['exclude'])){
              $exclude = $_POST['exclude'];//array passed to here
            }
          Severity: Minor
          Found in service_leader_functions.php - About 1 hr to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function displayActive has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

          function displayActive($i){
            include('mysql_access.php');
          
            $message = array("Past: ","Present: ","Cancelled: ");
            //echo $i;
          Severity: Minor
          Found in service_leader_functions.php - About 1 hr to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method displayView has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function displayView($i){
            include('mysql_access.php');
            $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
                e.name, d.DOW
                FROM contact_information AS c
          Severity: Minor
          Found in service_leader_functions.php - About 1 hr to fix

            Function processAttendance has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            function processAttendance($d,$o){
              include('mysql_access.php');
              echo "<h1>Process Attendance</h1>";
              echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
            
            
            Severity: Minor
            Found in service_leader_functions.php - About 1 hr to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function displayView has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            function displayView($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
                  e.name, d.DOW
                  FROM contact_information AS c
            Severity: Minor
            Found in service_leader_functions.php - About 55 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

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

            function processAttendance($d,$o){
              include('mysql_access.php');
              echo "<h1>Process Attendance</h1>";
              echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
            
            
            Severity: Minor
            Found in service_leader_functions.php by phpmd

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

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

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

              }else{
                echo "<h2>".$message[$i]."</h2><p>";
                while($r = mysqli_fetch_array($result)){
                  //$user_id = $r['id'];
                  $detail_id = $r['detail_id'];
            Severity: Minor
            Found in service_leader_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 displayActive uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                  }else{
                    echo ($DOW." ".$theDate." ".$name." start:".$start." end:".$end." count:".$count." max:".$max."<br/>");
                  }
            Severity: Minor
            Found in service_leader_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 process_log uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                  }else{
                    echo("<p>".mysqli_error().$sql);
                  }
            Severity: Minor
            Found in service_leader_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 displayView uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

              }else{
                /*while($r = mysql_fetch_array($result)){
                  $name = $r['name'];
                  $DOW = $r['DOW'];
                }*/
            Severity: Minor
            Found in service_leader_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 processAttendance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

              }else{
                echo "<table>";
                echo "<tr class=\"displayListing\"><td>absent</td><td>first</td><td>last</td><td>hours</td></tr>";
                while($r = mysqli_fetch_array($result)){
                  $fn = $r['firstname'];
            Severity: Minor
            Found in service_leader_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 process_log uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

              }else{
                $size = 0;
              }
            Severity: Minor
            Found in service_leader_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 processAttendance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

              }else{
                while($r = mysqli_fetch_array($result)){
                  $fna = $r['firstname'];
                  $lna = $r['lastname'];
                  echo $fna." ".$lna."<br/>";
            Severity: Minor
            Found in service_leader_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 displayView uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                }else{
                  echo "no data available. this could be because no one has signed up yet.";
                }
            Severity: Minor
            Found in service_leader_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 '$email'.
            Open

                  $email = $r['email'];
            Severity: Minor
            Found in service_leader_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_leader_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 '$phone'.
            Open

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

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

                $id = $_POST['event'];//WORKS
            Severity: Minor
            Found in service_leader_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 processAttendance() contains an exit expression.
            Open

              $query = $db->query($sql) or die("Error: line 24");
            Severity: Minor
            Found in service_leader_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 parameters such as '$d'.
            Open

            function processAttendance($d,$o){
            Severity: Minor
            Found in service_leader_functions.php by phpmd

            UnusedFormalParameter

            Since: 0.2

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

            Example

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

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

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

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

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

                die("error");
            Severity: Minor
            Found in service_leader_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 '$lastname'.
            Open

                  $lastname = $r['lastname'];
            Severity: Minor
            Found in service_leader_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 $d. Configured minimum length is 3.
            Open

              $d = $_POST['detail_id'];
            Severity: Minor
            Found in service_leader_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 $o. Configured minimum length is 3.
            Open

            function processAttendance($d,$o){
            Severity: Minor
            Found in service_leader_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 = $r['id'];
            Severity: Minor
            Found in service_leader_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 = $_SESSION['sessionID'];
            Severity: Minor
            Found in service_leader_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($result)){
            Severity: Minor
            Found in service_leader_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 $ln. Configured minimum length is 3.
            Open

                    $ln = $r['lastname'];
            Severity: Minor
            Found in service_leader_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 $o. Configured minimum length is 3.
            Open

              $o = $_POST['occurrence_id'];
            Severity: Minor
            Found in service_leader_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_leader_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 processAttendance($d,$o){
            Severity: Minor
            Found in service_leader_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 $i. Configured minimum length is 3.
            Open

            function displayActive($i){
            Severity: Minor
            Found in service_leader_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 $i. Configured minimum length is 3.
            Open

            function displayView($i){
            Severity: Minor
            Found in service_leader_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 $ln. Configured minimum length is 3.
            Open

                  $ln = $r['lastname'];
            Severity: Minor
            Found in service_leader_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['event'];//WORKS
            Severity: Minor
            Found in service_leader_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 $fn. Configured minimum length is 3.
            Open

                  $fn = $r['firstname'];
            Severity: Minor
            Found in service_leader_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($result)){
            Severity: Minor
            Found in service_leader_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 $fn. Configured minimum length is 3.
            Open

                    $fn = $r['firstname'];
            Severity: Minor
            Found in service_leader_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($result)){
            Severity: Minor
            Found in service_leader_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

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

                  $additional_info = NULL;
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Blank line found at end of control structure
            Open

            
            
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line exceeds 120 characters; contains 226 characters
            Open

                    echo ($DOW." ".$theDate." ".$name." start:".$start." end:".$end." count:".$count." max:".$max." <a href=\"service_leader_dashboard.php?d=".$detail_id."&z=".$i.$additional_info."&o=".$occurrence_id."\">view</a> <br/>");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line exceeds 120 characters; contains 128 characters
            Open

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

            Opening brace should be on a new line
            Open

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

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

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

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

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after closing brace; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing brace; 0 found
            Open

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

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

              $o = $_POST['occurrence_id'];
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after ELSE keyword; 0 found
            Open

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

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

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

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

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

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

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

            Expected 1 space after IF keyword; 0 found
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

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

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

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

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

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

                $id = $_POST['event'];//WORKS
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after ELSE keyword; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

                echo ("could not retrieve");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

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

                $exclude = $_POST['exclude'];//array passed to here
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if(isset($exclude)){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

              $d = $_POST['detail_id'];
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function process_log(){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after FOR keyword; 0 found
            Open

                for($v = 0; $v < $size; $v++){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Expected 1 space after WHILE keyword; 0 found
            Open

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

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

              echo "<h2>$name  |  $DOW</h2>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after first semicolon of FOR loop; 0 found
            Open

              for($i=0;$i<$sizeALL;$i++){//do something for each, index begins at 0.
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function processNew(){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

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

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

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

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

              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

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

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

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

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

                  echo "no data available. this could be because no one has signed up yet.";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

              if(isset($exclude)){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

            echo"
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Opening brace should be on a new line
            Open

            function displayView($i){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

            Expected 1 space after closing brace; 0 found
            Open

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

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

                    echo "<tr class=\"rowm1\"><td>".$fn." ".$ln."<br/>".$phone."<br/>".$email."</td><td><br/>$drive</td></tr>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                $size = count($exclude);//count elements
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 12 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 12 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

                for($v = 0; $v < $size; $v++){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                  echo "<tr class=\"displayListing\"><td>Info</td><td>Seats</td></tr>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

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

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

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

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

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

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

            Expected 1 space after ELSE keyword; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

                  $sql = "UPDATE `service_attendance` SET processed = -1
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

              if(isset($exclude)){
            Severity: Minor
            Found in service_leader_functions.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_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

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

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

              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, c.id
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 2
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Expected 1 space after closing brace; 0 found
            Open

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

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

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Line indented incorrectly; expected 8 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

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

                echo "<tr class=\"displayListing\"><td>absent</td><td>first</td><td>last</td><td>hours</td></tr>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

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

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

                  echo "<input type=\"hidden\" name=\"all[]\" value=\"$id\"/>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

            Expected 1 space after FOR keyword; 0 found
            Open

              for($i=0;$i<$sizeALL;$i++){//do something for each, index begins at 0.
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 6
            Open

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

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

                  $exclude = $exclude[$v];
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 2
            Open

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

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

              $sql = "SELECT c.firstname, c.lastname, c.id, o.length, l.detail_id
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Expected 1 space after WHILE keyword; 0 found
            Open

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

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

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

            Expected 1 space after ELSE keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after ELSE keyword; 0 found
            Open

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

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

                echo ("could not retrieve");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

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

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

            Expected 1 space after IF keyword; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

                    $additional_info = "&p=-1";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

            Expected 1 space after closing brace; 0 found
            Open

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                for($v = 0; $v < $size; $v++){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after ELSE keyword; 0 found
            Open

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

            Expected 1 space after ELSE keyword; 0 found
            Open

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

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

              echo "<p><h2>Approved</h2>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                $allz = $all[$i];
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

                    echo ($DOW." ".$theDate." ".$name." start:".$start." end:".$end." count:".$count." max:".$max." <a href=\"service_leader_dashboard.php?d=".$detail_id."&z=".$i.$additional_info."&o=".$occurrence_id."\">view</a> <br/>");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

              $last = $sizeALL-1;
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Expected 1 space after closing brace; 0 found
            Open

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

              echo "<h1>Process Attendance</h1>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

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

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

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

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after ELSE keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

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

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

                  echo("<td><input type=\"text\" name=\"hours[]\" value=\"$hours\"></td></tr>");
            Severity: Minor
            Found in service_leader_functions.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_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

            Line indented incorrectly; expected 12 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

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

                  $additional_info = NULL;
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 12 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                $size = 0;
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

              for($i=0;$i<$sizeALL;$i++){//do something for each, index begins at 0.
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                $hoursz = $hours[$i];
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

                      echo("<br/>".$occurrence." <br/>    ".$hoursz."  <br/>    ".$allz."    <br/> ".mysql_error().$sql);
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

            function processAttendance($d,$o){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 12 spaces, found 4
            Open

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

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

                  echo $fna." ".$lna."<br/>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

                $sql = "UPDATE `service_attendance` SET processed = 1, length = $hoursz
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

            Expected 1 space after closing brace; 0 found
            Open

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

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

              $message = array("Past: ","Present: ","Cancelled: ");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

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

                echo "<h2>".$message[$i]."</h2><p>";
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

              $sizeALL = count($all);//count elements
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, c.id, d.length, a.occurrence_id
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

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

            Expected 1 space after IF keyword; 0 found
            Open

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              for($i=0;$i<$sizeALL;$i++){//do something for each, index begins at 0.
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Expected 1 space after second semicolon of FOR loop; 0 found
            Open

              for($i=0;$i<$sizeALL;$i++){//do something for each, index begins at 0.
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

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

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

                    echo("<p>".mysqli_error().$sql);
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

                echo ("could not retrieve");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

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

            Opening brace should be on a new line
            Open

            function processAttendance($d,$o){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

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

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

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

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

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

            Expected 1 space after closing brace; 0 found
            Open

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

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

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

            Line indented incorrectly; expected 8 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    echo ($DOW." ".$theDate." ".$name." start:".$start." end:".$end." count:".$count." max:".$max."<br/>");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Line indented incorrectly; expected 12 spaces, found 6
            Open

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

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

                  echo("<tr><td><input type=\"checkbox\" name=\"exclude[]\" value=\"$id\"></td><td>{$fn}</td><td>$ln</td>");
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

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

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

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function displayActive($i){
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

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

            Expected 1 space after closing parenthesis; found 0
            Open

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

            Line indented incorrectly; expected 12 spaces, found 6
            Open

                  }
            Severity: Minor
            Found in service_leader_functions.php by phpcodesniffer

            The variable $additional_info is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 $occurrence_id is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 $additional_info is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayView($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
                  e.name, d.DOW
                  FROM contact_information AS c
            Severity: Minor
            Found in service_leader_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 process_log(){
              include('mysql_access.php');
              if(isset($_POST['exclude'])){
                $exclude = $_POST['exclude'];//array passed to here
              }
            Severity: Minor
            Found in service_leader_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 processAttendance($d,$o){
              include('mysql_access.php');
              echo "<h1>Process Attendance</h1>";
              echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
            
            
            Severity: Minor
            Found in service_leader_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 processAttendance($d,$o){
              include('mysql_access.php');
              echo "<h1>Process Attendance</h1>";
              echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
            
            
            Severity: Minor
            Found in service_leader_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 $additional_info is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 $occurrence_id is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 $occurrence_id is not named in camelCase.
            Open

            function displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 process_log(){
              include('mysql_access.php');
              if(isset($_POST['exclude'])){
                $exclude = $_POST['exclude'];//array passed to here
              }
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayView($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
                  e.name, d.DOW
                  FROM contact_information AS c
            Severity: Minor
            Found in service_leader_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 processAttendance($d,$o){
              include('mysql_access.php');
              echo "<h1>Process Attendance</h1>";
              echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
            
            
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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 displayActive($i){
              include('mysql_access.php');
            
              $message = array("Past: ","Present: ","Cancelled: ");
              //echo $i;
            Severity: Minor
            Found in service_leader_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