APO-Epsilon/apo-website

View on GitHub
update_semester.php

Summary

Maintainability
A
2 hrs
Test Coverage

show_active accesses the super-global variable $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 $_POST.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.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 show_active has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function show_active() {
    $id = $_SESSION['sessionID'];    
    
    include('retrieve_user.php');
    $position = id_to_position($id);
Severity: Minor
Found in update_semester.php - About 1 hr to fix

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

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php - About 35 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

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

                      if ($final = $db->query($sql)) {
    Severity: Minor
    Found in update_semester.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 assigning values to variables in if clauses and the like (line '52', column '14').
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 "Failed to update.";
                     }
    Severity: Minor
    Found in update_semester.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

                      if ($final = $db->query($sql)) {
    Severity: Minor
    Found in update_semester.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 '$final'.
    Open

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

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

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

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

        $id = $_SESSION['sessionID'];    
    Severity: Minor
    Found in update_semester.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 "false" but found "False"
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

        
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

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

    Spaces must be used for alignment; tabs are not allowed
    Open

        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

        
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

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

    Spaces must be used for alignment; tabs are not allowed
    Open

        include('retrieve_user.php');
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

        if ($position == 'Webmaster')
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

        
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

                     }
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

                <p>Previous Semester:</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            </form>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            if (isset($_POST['submit']))
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                $p_y = $_POST['previous_year'];
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                //update session variables
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                           echo "Failed to update.";
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                $c_s = $_POST['current_semester'];
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            <form form name="signin" action="" method="post">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

                $c_y = $_POST['current_year'];
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="text" name="current_semester" value="<?php echo $current_semester ?>">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="text" name="previous_semester" value="<?php echo $previous_semester ?>">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <p>Next Semester:</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                $n_s = $_POST['next_semester'];
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            //display boxes for session variables
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="text" name="next_semester" value="<?php echo $next_semester ?>">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                $sql="UPDATE session_vars SET previous_semester='$p_s',current_semester='$c_s',next_semester='$n_s',previous_year='$p_y',current_year='$c_y' WHERE current = 1";
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="text" name="previous_year" value="<?php echo $previous_year ?>">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <p>Current Year:</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <p>Previous Year:</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="text" name="current_year" value="<?php echo $current_year ?>">
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <input type="submit" name="submit" value="Update Session"/></p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            <p>This page allows the Webmaster to update the session variables that control what semester the website is in.</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                $p_s = $_POST['previous_semester'];
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                        echo "Updated.";
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

                <p>Current Semester:</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

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

    Spaces must be used for alignment; tabs are not allowed
    Open

            {
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Spaces must be used for alignment; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

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

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

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

    Line exceeds 120 characters; contains 172 characters
    Open

                $sql="UPDATE session_vars SET previous_semester='$p_s',current_semester='$c_s',next_semester='$n_s',previous_year='$p_y',current_year='$c_y' WHERE current = 1";
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Line exceeds 120 characters; contains 123 characters
    Open

            <p>This page allows the Webmaster to update the session variables that control what semester the website is in.</p>
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Whitespace found at end of line
    Open

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

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

    global $current_year;
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Expected 1 space after closing parenthesis; found 6
    Open

        if ($position == 'Webmaster')
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

    global $current_semester;
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

    global $next_semester;
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

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

    global $previous_semester;
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

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

    Space before opening parenthesis of function call prohibited
    Open

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

    Opening brace should be on a new line
    Open

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

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

    global $previous_year;
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Expected 1 space after closing parenthesis; found 10
    Open

            if (isset($_POST['submit']))
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

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

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                     }
    Severity: Minor
    Found in update_semester.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

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

    The variable $current_year is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $previous_year is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $p_y is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $p_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $p_y is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $current_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $current_year is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $c_y is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $current_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $c_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $previous_year is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $c_y is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $previous_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $next_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.php by phpmd

    CamelCaseVariableName

    Since: 0.2

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

    Example

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

    Source

    The variable $p_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $c_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $n_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $next_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $n_s is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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 $previous_semester is not named in camelCase.
    Open

    function show_active() {
        $id = $_SESSION['sessionID'];    
        
        include('retrieve_user.php');
        $position = id_to_position($id);
    Severity: Minor
    Found in update_semester.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