diff --git a/config/phpstan/phpstan.neon b/config/phpstan/phpstan.neon index cc68076f..9b24277b 100644 --- a/config/phpstan/phpstan.neon +++ b/config/phpstan/phpstan.neon @@ -24,7 +24,7 @@ parameters: - %rootDir%/../../../templates dynamicConstantNames: - SITE_STATUS - - DONATION_DRIVE_ENABLED + - DONATION_DRIVES_ENABLED - DONATION_DRIVE_COUNTER_ENABLED earlyTerminatingMethodCalls: Template: diff --git a/lib/OpdsFeed.php b/lib/OpdsFeed.php index 169ca83c..66c699f0 100644 --- a/lib/OpdsFeed.php +++ b/lib/OpdsFeed.php @@ -2,7 +2,7 @@ use Safe\DateTimeImmutable; use function Safe\file_put_contents; -class OpdsFeed extends AtomFeed{ +abstract class OpdsFeed extends AtomFeed{ public ?OpdsNavigationFeed $Parent = null; /** diff --git a/lib/RssFeed.php b/lib/RssFeed.php index d4e0e065..5783bab6 100644 --- a/lib/RssFeed.php +++ b/lib/RssFeed.php @@ -22,8 +22,7 @@ class RssFeed extends Feed{ protected function GetXmlString(): string{ if($this->XmlString === null){ - $timestamp = NOW->format('r'); - $feed = Template::RssFeed(['url' => $this->Url, 'description' => $this->Description, 'title' => $this->Title, 'entries' => $this->Entries, 'updated' => $timestamp]); + $feed = Template::RssFeed(['url' => $this->Url, 'description' => $this->Description, 'title' => $this->Title, 'entries' => $this->Entries, 'updated' => NOW]); $this->XmlString = $this->CleanXmlString($feed); } diff --git a/scripts/process-pending-payments b/scripts/process-pending-payments index 8afb8c66..d91e430d 100755 --- a/scripts/process-pending-payments +++ b/scripts/process-pending-payments @@ -82,7 +82,7 @@ try{ ) ', [$pendingPayment->TransactionId])){ $log->Write('Donation already exists in database.'); - continue; + continue 2; // `switch` is considered a "loop" by PHP. } $driver->get('https://fundraising.fracturedatlas.org/admin/donations?query=' . $pendingPayment->TransactionId); @@ -115,7 +115,7 @@ try{ } catch(Exception){ $log->Write('Error: Couldn\'t find donation.'); - continue; + continue 2; // `switch` is considered a "loop" by PHP. } $toggleButton->click(); @@ -185,7 +185,7 @@ try{ catch(Exceptions\PaymentExistsException){ // Payment already exists, just continue. $log->Write('Donation already in database.'); - continue; + continue 2; // `switch` is considered a "loop" by PHP. } // Does this payment create a new Patron in the Patrons Circle? diff --git a/templates/ArtworkForm.php b/templates/ArtworkForm.php index 30ef4168..13e251ec 100644 --- a/templates/ArtworkForm.php +++ b/templates/ArtworkForm.php @@ -1,7 +1,7 @@ - AlternateNames as $alternateName){ ?> - + AlternateNames ?? []) as $alternateName){ ?> + @@ -40,7 +40,7 @@ $isEditForm = $isEditForm ?? false; name="artist-year-of-death" inputmode="numeric" pattern="[0-9]{1,4}" - value="Artist->DeathYear) ?>" + value="Artist->DeathYear) ?>" /> @@ -59,7 +59,7 @@ $isEditForm = $isEditForm ?? false; name="artwork-year" inputmode="numeric" pattern="[0-9]{1,4}" - value="CompletedYear) ?>" + value="CompletedYear) ?>" />