Skip to content

Commit

Permalink
fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Nov 24, 2023
1 parent ba57286 commit 2832c84
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/templates/subscription/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
include dirname(__DIR__) . "/header.php";

$status = true;
$subscription = null;

// Check if the form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
Expand All @@ -12,8 +13,6 @@
$email = $_POST['email'];
$phone = $_POST['phone'];

$subscription = null;

try {
$subscription = Subscription::subscribe_person(
$fullname, $email, $phone
Expand All @@ -32,7 +31,7 @@
}
}

if ($subscription && $status == true) {
if ($subscription !== null && $status === true) {
?>

<h1>¡ CONFIRMAMOS TU PARTICIPACIÓN EN EL RETIRO!</h1>
Expand Down Expand Up @@ -179,7 +178,7 @@
name="fullname"
id="fullname"
required
value="<?php echo $subscription ? $subscription->person->fullname : ""; ?>"
value="<?php echo $subscription !== null ? $subscription->person->fullname : ""; ?>"
/><br><br>

<label for="email">Email:</label>
Expand All @@ -188,7 +187,7 @@
name="email"
id="email"
required
value="<?php echo $subscription ? $subscription->person->email : ""; ?>"
value="<?php echo $subscription !== null ? $subscription->person->email : ""; ?>"
/><br><br>

<label for="phone">Phone:</label>
Expand All @@ -197,7 +196,7 @@
name="phone"
id="phone"
required
value="<?php echo $subscription ? $subscription->person->phone : ""; ?>"
value="<?php echo $subscription !== null ? $subscription->person->phone : ""; ?>"
/><br><br>

<button type="submit" class="btn btn-primary">Save</button>
Expand Down

0 comments on commit 2832c84

Please sign in to comment.