APO-Epsilon/apo-website

View on GitHub
nickname.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        $response=$db->query("SELECT COUNT(nickname) FROM test_nickname");
Severity: Minor
Found in nickname.php by phpmd

UndefinedVariable

Since: 2.8.0

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

Example

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

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

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

        $response=$db->query("SELECT COUNT(nickname) FROM test_nickname");
Severity: Minor
Found in nickname.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 26 and the first side effect is on line 2.
Open

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

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

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

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

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

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

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

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

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

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

        <!-- <input type="text" name="event_description"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <input type="hidden" name="event_type" value="Point"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <input type="text" name="event_title"        >
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <p>Repeatable? -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        $next = $result['COUNT(nickname)'] + 1;
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <p>Description:<p> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        echo "<input type='hidden' name='nickname' value=" . $next . ">";
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <p>Nickname:
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <p>Leadership Points: -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <input type="checkbox" name="repeatable"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

    <h1> Nickname Page </h1>
Severity: Minor
Found in nickname.php by phpcodesniffer

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

    <form name="myform" action="nickname_created.php" method="post">
Severity: Minor
Found in nickname.php by phpcodesniffer

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

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

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

        <!-- <input type="number" name="F_val" value="0"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <input type="submit" name="submit" value="create"/> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        $result=mysqli_fetch_array($response);
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <input type="number" name="L_val" value="0"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        $response=$db->query("SELECT COUNT(nickname) FROM test_nickname");
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <p>
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <p>Friendship Points: -->
Severity: Minor
Found in nickname.php by phpcodesniffer

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

        <!-- <input type="hidden" name="cap" value="0"> -->
Severity: Minor
Found in nickname.php by phpcodesniffer

Space before opening parenthesis of function call prohibited
Open

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

Space before opening parenthesis of function call prohibited
Open

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

Opening brace should be on a new line
Open

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

There are no issues that match your filters.

Category
Status