DesarrollosWeb/documentofacil

View on GitHub
datos_personales.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 39 of 39 total issues

Expected an object instance when accessing an instance property, but saw an expression with type null
Open

$user_metadata = get_user_meta($user->ID, "", false);
Severity: Minor
Found in datos_personales.php by phan

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

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

Call to undeclared function \WC()
Open

$states = WC()->countries->get_states("ES");
Severity: Critical
Found in datos_personales.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 datos_personales.php by phan

Call to method __construct from undeclared class \Procedure
Open

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

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<label for="last_name" class="col-4 col-form-label"><?= $text["lastname"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

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

Call to undeclared function \get_footer()
Open

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

Call to method get_document_types from undeclared class \Procedure
Open

$document_types = $procedure->get_document_types();
Severity: Critical
Found in datos_personales.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 datos_personales.php by phan

Variable $text is undeclared
Open

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

Call to method get_identification__types from undeclared class \Procedure
Open

$document_types = Procedure::get_identification__types();
Severity: Critical
Found in datos_personales.php by phan

Variable $text is undeclared
Open

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

Call to undeclared function \get_user_meta()
Open

$user_metadata = get_user_meta($user->ID, "", false);
Severity: Critical
Found in datos_personales.php by phan

Variable $text is undeclared
Open

<label for="first_name" class="col-4 col-form-label"><?= $text["name"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Call to undeclared function \get_userdata()
Open

$user = get_userdata(2);
Severity: Critical
Found in datos_personales.php by phan

Call to method update_user_info from undeclared class \Procedure
Open

$result = $procedure->update_user_info($user, $_POST);
Severity: Critical
Found in datos_personales.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<label for="billing_address_1" class="col-4 col-form-label"><?= $text["address"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Variable $text is undeclared
Open

<label for="billing_state" class="col-4 col-form-label"><?= $text["province"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Variable $text is undeclared
Open

<label for="billing_phone" class="col-4 col-form-label"><?= $text["telephone"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

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

Variable $text is undeclared
Open

<label for="billing_city" class="col-4 col-form-label"><?= $text["city"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

Variable $text is undeclared
Open

<label for="billing_postcode" class="col-4 col-form-label"><?= $text["postal_code"]; ?></label>
Severity: Minor
Found in datos_personales.php by phan

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

"document_number",
Severity: Critical
Found in datos_personales.php by sonar-php

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

"billing_email",
Severity: Critical
Found in datos_personales.php by sonar-php

Remove this commented out code.
Open

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

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

"nationality"
Severity: Critical
Found in datos_personales.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 datos_personales.php by sonar-php

Remove this commented out code.
Open

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

Line exceeds 120 characters; contains 155 characters
Open

<option value="<?= $key ?>" <?= ($key == $user_metadata["billing_state"][0]) ? "selected" : ""; ?> ><?= $value; ?></option>
Severity: Minor
Found in datos_personales.php by phpcodesniffer

Line exceeds 120 characters; contains 156 characters
Open

<option value="<?= $key; ?>" <?= ($key == $user_metadata["document_type2"][0]) ? "selected" : ""; ?>><?= $value; ?></option>
Severity: Minor
Found in datos_personales.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

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

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($states as $key => $value): ?>
Severity: Minor
Found in datos_personales.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

<?php foreach ($document_types as $key => $value): ?>
Severity: Minor
Found in datos_personales.php by phpcodesniffer

There are no issues that match your filters.

Category
Status