DesarrollosWeb/documentofacil

View on GitHub
mis_documentos.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 35 of 35 total issues

Variable $text is undeclared
Open

.append(`<label class='form-label'><?= $text["document"]?>:</label>`, {class: "form-label"})
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

alert("<?= $text["max_number_reached"];?>");
Severity: Minor
Found in mis_documentos.php by phan

Call to method process from undeclared class \Procedure
Open

$result = $procedure->process($_POST, $_FILES);
Severity: Critical
Found in mis_documentos.php by phan

Call to method __construct from undeclared class \Procedure
Open

$procedure = new Procedure($_SESSION["email"]);
Severity: Critical
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

let helpText = $("<small><?= $text["accepted_files"]; ?></small>", {class: "form-text text-muted"});
Severity: Minor
Found in mis_documentos.php by phan

Call to undeclared function \krumo()
Open

krumo($result);
Severity: Critical
Found in mis_documentos.php by phan

Call to method get_user_files from undeclared class \Procedure
Open

$user_files = $procedure->get_user_files();
Severity: Critical
Found in mis_documentos.php by phan

Call to method get_document_types_string from undeclared class \Procedure
Open

const documentTypes = [<?= $procedure->get_document_types_string(); ?>];
Severity: Critical
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<h2><?= $text["upload_required_documents"]; ?></h2>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

type="button"><?= $text["add_document"]; ?></button>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<?= $text["accepted_files"]; ?>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

.append(`<label class="form-label"><?=$text["document_name"];?></label>`)
Severity: Minor
Found in mis_documentos.php by phan

Call to method get_user_type from undeclared class \Procedure
Open

$user_info = $procedure->get_user_type("");
Severity: Critical
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<label class="form-label" for="file"><?= $text["document"]; ?>:</label>
Severity: Minor
Found in mis_documentos.php by phan

Call to undeclared function \get_footer()
Open

get_footer();
Severity: Critical
Found in mis_documentos.php by phan

Call to undeclared function \wp_get_current_user() (Did you mean \get_current_user())
Open

$user = wp_get_current_user();
Severity: Critical
Found in mis_documentos.php by phan

Call to method get_document_types from undeclared class \Procedure
Open

$document_types = $procedure->get_document_types();
Severity: Critical
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<button type="submit" name="submit" class="btn btn-success"><?= $text["send"]; ?></button>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

.append(`<label class='form-label'><?= $text["document_name"]?>: </label>`)
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

alert("<?= $text["file_too_large"];?>");
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<h1 class="display-4"><?= $text["procedure_title"]; ?></h1>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<label for="document_type" class="form-label"><?= $text["document_type"]; ?></label>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

class="btn btn-secondary"><?= $text["back"]; ?></button>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<title><?= $text["site_name"] . " - " . $text["procedure_title"]; ?></title>
Severity: Minor
Found in mis_documentos.php by phan

Call to undeclared function \get_header() (Did you mean \get_headers())
Open

get_header();
Severity: Critical
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<?= $text["process_success"]; ?>.
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<label for="document_name" class="form-label"><?= $text["document_name"]; ?></label>
Severity: Minor
Found in mis_documentos.php by phan

Variable $text is undeclared
Open

<h1><?= $text["my_documents"]; ?></h1>
Severity: Minor
Found in mis_documentos.php by phan

Define a constant instead of duplicating this literal "document_name" 5 times.
Open

target="_blank"><?= (!empty($document["document_name"])) ? $document["type"] . " - " . $document["document_name"] : $document["type"]; ?></a>
Severity: Critical
Found in mis_documentos.php by sonar-php

Define a constant instead of duplicating this literal "email" 3 times.
Open

$_SESSION["email"] = $user->user_email;
Severity: Critical
Found in mis_documentos.php by sonar-php

Line exceeds 120 characters; contains 172 characters
Open

target="_blank"><?= (!empty($document["document_name"])) ? $document["type"] . " - " . $document["document_name"] : $document["type"]; ?></a>
Severity: Minor
Found in mis_documentos.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($user_files["data"] as $document): ?>
Severity: Minor
Found in mis_documentos.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (count($user_files["data"]) > 0): ?>
Severity: Minor
Found in mis_documentos.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($document_types as $document): ?>
Severity: Minor
Found in mis_documentos.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (isset($result)): ?>
Severity: Minor
Found in mis_documentos.php by phpcodesniffer
Category
Status