APO-Epsilon/apo-website

View on GitHub
retrieve_event.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpmd

UndefinedVariable

Since: 2.8.0

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

Example

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

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

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpmd

UndefinedVariable

Since: 2.8.0

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

Example

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

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

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

    $result = $db->query($statement) or die("could not update");
Severity: Minor
Found in retrieve_event.php by phpmd

UndefinedVariable

Since: 2.8.0

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

Example

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

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

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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 did_user_attend uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    {
        $present = false;
    }
Severity: Minor
Found in retrieve_event.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

    {
        $present = false;
    }
Severity: Minor
Found in retrieve_event.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

    $result = $db->query($statement) or die("could not update");
Severity: Minor
Found in retrieve_event.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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 signup() contains an exit expression.
Open

    $result = $db->query($statement) or die("could not update");
Severity: Minor
Found in retrieve_event.php by phpmd

ExitExpression

Since: 0.2

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

Example

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

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

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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 add_excuse() contains an exit expression.
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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 '$result'.
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.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 missed_meeting() contains an exit expression.
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.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 '$result'.
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

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

    $result = $db->query($statement) or die("could not update");
Severity: Minor
Found in retrieve_event.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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

function did_user_attend ($uid,$eid)
{
    include('mysql_access.php');
    $query = "SELECT user_id FROM events_signup WHERE event_id = '$eid' AND user_id = '$uid'";
    $results=$db->query($query);
Severity: Major
Found in retrieve_event.php and 1 other location - About 1 hr to fix
retrieve_event.php on lines 66..85

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 102.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

function is_user_excused ($uid,$eid)
{
    include('mysql_access.php');
    $query = "SELECT user_id FROM excused WHERE event_id = '$eid' AND user_id = '$uid'";
    $results=$db->query($query);
Severity: Major
Found in retrieve_event.php and 1 other location - About 1 hr to fix
retrieve_event.php on lines 45..64

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 102.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

function id_to_name ($id) 
Severity: Minor
Found in retrieve_event.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

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

    $statement ="INSERT INTO events_signup (user_id,event_id) VALUES ($uid,$eid)";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    if ($final['user_id'] == $uid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function add_excuse ($uid,$eid,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function add_excuse ($uid,$eid,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

{    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $results->free();
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    {
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

    {
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function signup ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function missed_meeting ($uid,$meeting,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function did_user_attend ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function is_user_excused ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $final=mysqli_fetch_array($results);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

        $present = false;
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $final=mysqli_fetch_array($results);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    else
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function id_to_name ($id) 
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function signup ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

    $query = "SELECT user_id FROM events_signup WHERE event_id = '$eid' AND user_id = '$uid'";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function is_user_excused ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

        $present = true;
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function id_to_name ($id) 
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 0 spaces before opening parenthesis; 1 found
Open

function missed_meeting ($uid,$meeting,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    if ($final['user_id'] == $uid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    {
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

    $statement ="INSERT INTO excused (user_id,event_id,excuse,semester) VALUES ($uid,$eid,'$excuse','$semester')";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $statement ="INSERT INTO meetings_missed (user_id,meeting,semester,excuse) VALUES ($uid,'$meeting','$semester','$excuse')";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    else
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    {
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $result = $db->query($statement) or die("could not update");
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $results->free();
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected "function abc(...)"; found "function abc (...)"
Open

function did_user_attend ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

        $present = false;
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $query = "SELECT user_id FROM excused WHERE event_id = '$eid' AND user_id = '$uid'";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

        $present = true;
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    return $final[$operand];
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $results=$db->query($query);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $final=mysqli_fetch_array($results);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Line exceeds 120 characters; contains 127 characters
Open

    $statement ="INSERT INTO meetings_missed (user_id,meeting,semester,excuse) VALUES ($uid,'$meeting','$semester','$excuse')";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $results->free();
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

    $query = "SELECT $operand FROM events_listing WHERE $condition = '$value'";
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

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

Whitespace found at end of line
Open

  return $name;  
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function signup ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function missed_meeting ($uid,$meeting,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function missed_meeting ($uid,$meeting,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

  $condition = 'id';  
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

  return $name;  
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function is_user_excused ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

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

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

  $name = select_event($operand, $condition, $id);
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

    $result = $db->query($statement) or die("could not update");    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

    return $present;    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

  $condition = 'id';  
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

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

Expected 1 space after closing parenthesis; found 6
Open

    if ($final['user_id'] == $uid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 space after closing brace; newline found
Open

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

function id_to_name ($id) 
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function add_excuse ($uid,$eid,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

  $operand = 'event_name';
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 space after ELSE keyword; newline found
Open

    else
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 newline at end of file; 0 found
Open

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

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

function add_excuse ($uid,$eid,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 6
Open

    if ($final['user_id'] == $uid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function add_excuse ($uid,$eid,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function did_user_attend ($uid,$eid)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 space after closing brace; newline found
Open

    }
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Whitespace found at end of line
Open

{    
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

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

function missed_meeting ($uid,$meeting,$excuse,$semester)
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

Expected 1 space after ELSE keyword; newline found
Open

    else
Severity: Minor
Found in retrieve_event.php by phpcodesniffer

There are no issues that match your filters.

Category
Status