APO-Epsilon/apo-website

View on GitHub
user_photo.php

Summary

Maintainability
A
0 mins
Test Coverage

Space before opening parenthesis of function call prohibited
Open

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

Expected 1 space after IF keyword; 0 found
Open

if(isset($_GET['user_id']) && is_numeric($_GET['user_id'])){
Severity: Minor
Found in user_photo.php by phpcodesniffer

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

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

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

  $sql = "SELECT content FROM user_photos WHERE user_id=" . $_GET['user_id'] . ";";
Severity: Minor
Found in user_photo.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

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

Expected 1 space after IF keyword; 0 found
Open

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

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

    ;
Severity: Minor
Found in user_photo.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

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

Expected 1 space after closing brace; 0 found
Open

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

Expected 1 space after closing parenthesis; found 0
Open

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

Expected 1 space after closing parenthesis; found 0
Open

if(isset($_GET['user_id']) && is_numeric($_GET['user_id'])){
Severity: Minor
Found in user_photo.php by phpcodesniffer

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

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

Expected 1 space after ELSE keyword; 0 found
Open

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

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

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

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

    header("Content-type: image/jpeg");
Severity: Minor
Found in user_photo.php by phpcodesniffer

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

    echo $image_array['content'];
Severity: Minor
Found in user_photo.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  }
Severity: Minor
Found in user_photo.php by phpcodesniffer

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

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

There are no issues that match your filters.

Category
Status