DesarrollosWeb/documentofacil

View on GitHub
formulario.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 47 of 47 total issues

Call to undeclared function \WC()
Open

$states = WC()->countries->get_states("ES");
Severity: Critical
Found in formulario.php by phan

Call to method __construct from undeclared class \Procedure
Open

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

Variable $text is undeclared
Open

<li class="list-group-item"><strong><?= $text["document"]; ?></strong>
Severity: Minor
Found in formulario.php by phan

Call to method get_procedure_status from undeclared class \Procedure
Open

<?php foreach ($procedure->get_procedure_status() as $status): ?>
Severity: Critical
Found in formulario.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

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

Call to undeclared function \get_footer()
Open

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

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<strong><?= $text["creation_date"]; ?>
Severity: Minor
Found in formulario.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<strong><?= $text["update_date"]; ?>
Severity: Minor
Found in formulario.php by phan

Call to undeclared function \get_user_meta()
Open

$user_metadata = get_user_meta($procedure_data["procedure"]["user_id"], "", false);
Severity: Critical
Found in formulario.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<a href="tramites.php" class="btn btn-secondary"><?= $text["back_to_list"]; ?></a>
Severity: Minor
Found in formulario.php by phan

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

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

Variable $text is undeclared
Open

<strong><?= $text["user"]; ?></strong>: <?= $user_metadata["first_name"][0] . " " . $user_metadata["last_name"][0] . " (" . $procedure_data["procedure"]["user"] . ")"; ?>
Severity: Minor
Found in formulario.php by phan

Variable $text is undeclared
Open

<li class="list-group-item"><strong><?= $text["address"]; ?></strong>
Severity: Minor
Found in formulario.php by phan

Call to method get_document_types from undeclared class \Procedure
Open

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

Call to method get_user_type from undeclared class \Procedure
Open

$user = $procedure->get_user_type($_SESSION["email"]);
Severity: Critical
Found in formulario.php by phan

Variable $text is undeclared
Open

<h4><?= $text["documents"]; ?></h4>
Severity: Minor
Found in formulario.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<h3 class="card-title"><?= $text["personal_data"]; ?></h3>
Severity: Minor
Found in formulario.php by phan

Variable $text is undeclared
Open

<img src="gestoria/onedrive-logo.png" alt="<?= $text["sent_to_onedrive"]; ?>"><br/>
Severity: Minor
Found in formulario.php by phan

Call to method process from undeclared class \Procedure
Open

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

Variable $text is undeclared
Open

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

Call to method get_order_and_procedure from undeclared class \Procedure
Open

$procedure_data = $procedure->get_order_and_procedure($procedure_id);
Severity: Critical
Found in formulario.php by phan

Variable $text is undeclared
Open

<h4 class="card-subtitle mb-2 text-muted"><?= $text["procedure_status"]; ?>
Severity: Minor
Found in formulario.php by phan

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

$user_session = wp_get_current_user();
Severity: Critical
Found in formulario.php by phan

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

<label for="procedure_status" class="form-label"><?= $text["status"]; ?></label>
Severity: Critical
Found in formulario.php by sonar-php

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

<h4 class="card-subtitle mb-2 text-muted"><?= $text["procedure_status"]; ?>
Severity: Critical
Found in formulario.php by sonar-php

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

<?php if (isset($user) && isset($user["rol"]["administrator"])): ?>
Severity: Critical
Found in formulario.php by sonar-php

Remove this commented out code.
Open

//if (!IS_DEVELOPMENT) {
Severity: Major
Found in formulario.php by sonar-php

Remove this commented out code.
Open

//}
Severity: Major
Found in formulario.php by sonar-php

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

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

Define a constant instead of duplicating this literal "procedure" 11 times.
Open

$user_metadata = get_user_meta($procedure_data["procedure"]["user_id"], "", false);
Severity: Critical
Found in formulario.php by sonar-php

Line exceeds 120 characters; contains 198 characters
Open

<strong><?= $text["user"]; ?></strong>: <?= $user_metadata["first_name"][0] . " " . $user_metadata["last_name"][0] . " (" . $procedure_data["procedure"]["user"] . ")"; ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Line exceeds 120 characters; contains 156 characters
Open

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

Line exceeds 120 characters; contains 219 characters
Open

: <?= $user_metadata["billing_address_1"][0] . ", " . $user_metadata["billing_city"][0] . ". " . $states[$user_metadata["billing_state"][0]] . ", " . $user_metadata["billing_postcode"][0]; ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Line exceeds 120 characters; contains 155 characters
Open

<option <?php echo (strcasecmp($procedure_data["procedure"]["procedure_status"], $status["status"]) == 0) ? "selected" : ""; ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (isset($user) && isset($user["rol"]["customer"])): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (isset($user["rol"]["administrator"])): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($procedure->get_procedure_status() as $status): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (isset($user["rol"]["administrator"])): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php if (isset($user) && isset($user["rol"]["administrator"])): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($procedure_data["files"] as $file): ?>
Severity: Minor
Found in formulario.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

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

There are no issues that match your filters.

Category
Status