Switch from DateTime to DateTimeImmutable across codebase

This commit is contained in:
Alex Cabal 2024-04-13 14:05:14 -05:00
parent 92c647f2b1
commit e55fecaaa2
35 changed files with 102 additions and 99 deletions

View file

@ -1,5 +1,5 @@
<?
use Safe\DateTime;
use Safe\DateTimeImmutable;
use function Safe\file_get_contents;
class OpdsNavigationFeed extends OpdsFeed{
@ -25,7 +25,7 @@ class OpdsNavigationFeed extends OpdsFeed{
foreach($xml->xpath('//entry') ?: [] as $existingEntry){
foreach($this->Entries as $entry){
if($entry->Id == $existingEntry->id){
$entry->Updated = new DateTime($existingEntry->updated);
$entry->Updated = new DateTimeImmutable($existingEntry->updated);
}
}
}