APO-Epsilon/apo-website

View on GitHub
edit_exec.php

Summary

Maintainability
C
1 day
Test Coverage

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_SESSION.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_GET.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

show_active accesses the super-global variable $_SESSION.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

Function show_active has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Minor
Found in edit_exec.php - About 7 hrs 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 show_active has 110 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function show_active() {

    include('mysql_access.php');
    $position = $_SESSION['sessionposition'];
    echo $position;
Severity: Major
Found in edit_exec.php - About 4 hrs to fix

    The function show_active() has an NPath complexity of 706. The configured NPath complexity threshold is 200.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    NPathComplexity

    Since: 0.1

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

    Example

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

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

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

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

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

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    CyclomaticComplexity

    Since: 0.1

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

    Example

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

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

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

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.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("If you encounter problems, please contact the webmaster. 2");
    Severity: Minor
    Found in edit_exec.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("If you encounter problems, please contact the webmaster. 4");
    Severity: Minor
    Found in edit_exec.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

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.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

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.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("If you encounter problems, please contact the webmaster. 3");
    Severity: Minor
    Found in edit_exec.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("If you encounter problems, please contact the webmaster. 1");
    Severity: Minor
    Found in edit_exec.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

            if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.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");
    Severity: Minor
    Found in edit_exec.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");
    Severity: Minor
    Found in edit_exec.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("If you encounter problems, please contact the webmaster. 5");
    Severity: Minor
    Found in edit_exec.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

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

            } else {
              echo "There was an error adding position, please contact Webmaster.";
            }
    Severity: Minor
    Found in edit_exec.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 assigning values to variables in if clauses and the like (line '94', column '11').
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

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

          } else {
            echo "There was an error removing position, please contact Webmaster.";
          }
    Severity: Minor
    Found in edit_exec.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 assigning values to variables in if clauses and the like (line '65', column '13').
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

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

          } else {
            echo "There was an error, please contact Webmaster.";
          }
    Severity: Minor
    Found in edit_exec.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 assigning values to variables in if clauses and the like (line '76', column '11').
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

    Avoid assigning values to variables in if clauses and the like (line '49', column '11').
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

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

          } else {
            echo "There was an error, please contact Webmaster.";
          }
    Severity: Minor
    Found in edit_exec.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 function show_active() contains an exit expression.
    Open

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 4");
    Severity: Minor
    Found in edit_exec.php by phpmd

    ExitExpression

    Since: 0.2

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

    Example

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

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

    The function show_active() contains an exit expression.
    Open

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

    ExitExpression

    Since: 0.2

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

    Example

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

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

    The function show_active() contains an exit expression.
    Open

          $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 1");
    Severity: Minor
    Found in edit_exec.php by phpmd

    ExitExpression

    Since: 0.2

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

    Example

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

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

    The function show_active() contains an exit expression.
    Open

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 3");
    Severity: Minor
    Found in edit_exec.php by phpmd

    ExitExpression

    Since: 0.2

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

    Example

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

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

    The function show_active() contains an exit expression.
    Open

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 2");
    Severity: Minor
    Found in edit_exec.php by phpmd

    ExitExpression

    Since: 0.2

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

    Example

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

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

    The function show_active() contains an exit expression.
    Open

      $query = $db->query($sql) or die("Error");
    Severity: Minor
    Found in edit_exec.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 '$querey'.
    Open

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.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 show_active() contains an exit expression.
    Open

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 5");
    Severity: Minor
    Found in edit_exec.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

    A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 33 and the first side effect is on line 2.
    Open

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

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

          $id = $_GET['id'];
    Severity: Minor
    Found in edit_exec.php by phpmd

    ShortVariable

    Since: 0.2

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

    Example

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

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

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

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

    Blank line found at end of control structure
    Open

    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Blank line found at end of control structure
    Open

    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Blank line found at start of control structure
    Open

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

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (($position == "Webmaster" OR $position == "President" ) ) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    PHP keywords must be lowercase; expected "or" but found "OR"
    Open

    if (($position == "Webmaster" OR $position == "President" ) ) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Blank line found at start of control structure
    Open

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

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

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

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

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

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

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

    Blank line found at end of control structure
    Open

    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Blank line found at start of control structure
    Open

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

    Blank line found at end of control structure
    Open

    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Blank line found at start of control structure
    Open

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

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

        $s_exec = $_SESSION['sessionexec'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        echo $s_exec;
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        $position = $_SESSION['sessionposition'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

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

    Line exceeds 120 characters; contains 150 characters
    Open

            $sql = "UPDATE `contact_information` SET `exec` = 1, `position` = '$pos[position]', `status` = '$pos[position_status]' WHERE `id`='$user_id'";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line exceeds 120 characters; contains 132 characters
    Open

        print "<div><b>$r[position]:</b> $r[firstname] $r[lastname] | <a href='edit_exec.php?action=delete_exec&id=$r[id]'>X</a></div>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

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

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

            echo "Added Pledge Trainer";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

          $user_id = $_GET['user_id'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

          $sql = "SELECT `position`, `position_status` FROM `positions` WHERE `position_id` = '$pos_id' LIMIT 1";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

              echo "There was an error adding position, please contact Webmaster.";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

          $sql = "UPDATE `contact_information` SET `position` = 'Pledge Trainer', `status` = 'Active' WHERE `id`='$id'";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      $sql = "SELECT * FROM `contact_information` WHERE `exec` = 1 ORDER BY `position`";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

              echo "Update Executive List.";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

          $position_status = $_GET['position_status'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        if ($_GET['action'] == "delete_exec") {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

            echo "There was an error, please contact Webmaster.";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } elseif ($_GET['action'] == "make_exec") {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Expected 1 space after closing parenthesis; found 0
    Open

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

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } elseif ($_GET['action'] == "new_position") {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

          $position_name = $_GET['position_name'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

            echo "Removed position";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 20 spaces, found 8
    Open

            }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        $sql = "SELECT * FROM `contact_information` WHERE `position` = 'Pledge Trainer' ORDER BY `lastname`";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

            $sql = "UPDATE `contact_information` SET `exec` = 1, `position` = '$pos[position]', `status` = '$pos[position_status]' WHERE `id`='$user_id'";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

      echo "<h1>Pledge Trainers</h1>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

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

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

          $pos_id = $_GET['pos_id'];
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 20 spaces, found 8
    Open

            if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 20 spaces, found 8
    Open

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

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      $sql = "SELECT * FROM `positions`";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    if (($position == "Webmaster" OR $position == "President" ) ) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

          $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 1");
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 4
    Open

        } elseif ($_GET['action'] == "make_pledge_trainer") {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 2");
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      echo "<h1>Executive Board</h1>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

            echo "Added position $position_name";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

      echo "<h2>Add to Exec Board</h2>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      echo "<h1>Positions</h1>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

            echo "There was an error, please contact Webmaster.";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 3");
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 4");
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

      $sql = "SELECT * FROM `positions`";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      $query = $db->query($sql) or die("If you encounter problems, please contact the webmaster. 5");
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

          $sql = "INSERT INTO `positions` (position, position_status) VALUES ('$position_name', '$position_status')";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      echo "<select name='pos_id'>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        print "<option value='$r[position_id]'>$r[position]: $r[position_status]</option>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      echo "</select><input type='submit' value='Submit'/></form>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

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

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

        print "<div><b>$r[position]:</b> $r[position_status]";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        print "</div>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

    Line indented incorrectly; expected 16 spaces, found 6
    Open

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

    Expected 1 space after WHILE keyword; 0 found
    Open

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

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

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 0
    Open

    }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Opening brace should be on a new line
    Open

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

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

          $sql = "UPDATE `contact_information` SET `exec` = 0, `position` = '', `status` = 'Active' WHERE `id`=$id";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

            echo "There was an error removing position, please contact Webmaster.";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 6
    Open

          if ($querey = $db->query($sql)) {
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        print "<div><b>$r[position]:</b> $r[firstname] $r[lastname] | <a href='edit_exec.php?action=delete_exec&id=$r[id]'>X</a></div>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

        print "<div>$r[firstname] $r[lastname] | <a href='edit_exec.php?action=delete_exec&id=$r[id]'>X</a></div>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

      }
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

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

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

      echo "</select><input type='submit' value='Submit'/></form>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

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

      echo "<h2>Add to Pledge Trainers</h2>";
    Severity: Minor
    Found in edit_exec.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 2
    Open

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

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

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

    The variable $s_exec is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $position_status is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $pos_id is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $user_id is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $pos_id is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $user_id is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $position_name is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $position_status is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $position_name is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $s_exec is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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 $position_name is not named in camelCase.
    Open

    function show_active() {
    
        include('mysql_access.php');
        $position = $_SESSION['sessionposition'];
        echo $position;
    Severity: Minor
    Found in edit_exec.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