WIP on PHP 8.4 conversion

This commit is contained in:
danieljsummers committed 2024-12-05 18:23:11 -05:00
1 parent 9110643383
commit 3bb4be3127
16 files changed
+204 -157

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ Layout::bareHead(); ?>
<form hx-patch="/request/snooze?id=<?=$req->id?>" hx-target=#journalItems hx-swap=outerHTML>
<div class="form-floating pb-3">
<input type=date id=until name=until class=form-control
min="<?=(new DateTimeImmutable('now'))->format('Y-m-d')?>" required>
min="<?=new DateTimeImmutable('now')->format('Y-m-d')?>" required>
<label for=until>Until</label>
</div>
<p class="text-end mb-0"><button type=submit class="btn btn-primary">Snooze</button>
+1 -1
View File
@@ -28,7 +28,7 @@ Layout::pageHead('Full Request');?>
<h6 class="card-subtitle text-muted mb-2"><?php
if (!is_null($answered)) { ?>
Answered <?=$answered->format('F j, Y')?>
(<?= RelativeDate::between('now', $req->history[0]->asOf);?>) &bull;<?php
(<?=RelativeDate::between('now', $req->history[0]->asOf);?>) &bull;<?php
} ?>
Prayed <?=number_format($prayed)?> times &bull; Open <?=number_format($daysOpen)?> days
</h6>
+2 -2
View File
@@ -1,14 +1,14 @@
<?php declare(strict_types=1);
use BitBadger\PDODocument\Patch;
use MyPrayerJournal\Domain\Note;
use MyPrayerJournal\Table;
use MyPrayerJournal\Domain\Note;
require '../../start.php';
$req = validate_request($_GET['id'], ['POST'], false);
array_unshift($req->notes, new Note((new DateTimeImmutable('now'))->format('c'), $_POST['notes']));
array_unshift($req->notes, new Note(new DateTimeImmutable('now')->format('c'), $_POST['notes']));
Patch::byId(Table::REQUEST, $req->id, ['notes' => $req->notes]);
hide_modal('notes');
+1 -1
View File
@@ -1,8 +1,8 @@
<?php declare(strict_types=1);
use BitBadger\PDODocument\Patch;
use MyPrayerJournal\Domain\{History, RecurrencePeriod, RequestAction};
use MyPrayerJournal\Table;
use MyPrayerJournal\Domain\{History, RecurrencePeriod, RequestAction};
use MyPrayerJournal\UI\Component;
require '../../start.php';
+1 -1
View File
@@ -14,7 +14,7 @@ $reqs = Request::active();
Layout::pageHead('Active Requests'); ?>
<article class="container mt-3">
<h2 class=pb-3>Active Requests</h2><?php
if ($reqs->hasItems()) {
if ($reqs->hasItems) {
Component::requestList($reqs);
} else {
Component::noResults('No Active Requests', '/journal', 'Return to your journal',
+1 -1
View File
@@ -14,7 +14,7 @@ $reqs = Request::answered();
Layout::pageHead('Answered Requests'); ?>
<article class="container mt-3">
<h2 class=pb-3>Answered Requests</h2><?php
if ($reqs->hasItems()) {
if ($reqs->hasItems) {
Component::requestList($reqs);
} else {
Component::noResults('No Answered Requests', '/journal', 'Return to your journal', <<<'TEXT'
+1 -1
View File
@@ -14,7 +14,7 @@ $reqs = Request::snoozed();
Layout::pageHead('Snoozed Requests'); ?>
<article class="container mt-3">
<h2 class=pb-3>Snoozed Requests</h2><?php
if ($reqs->hasItems()) {
if ($reqs->hasItems) {
Component::requestList($reqs);
} else {
Component::noResults('No Snoozed Requests', '/journal', 'Return to your journal',