mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
Enable strict exception type hint checking in PHPStan and add exception type hints
This commit is contained in:
parent
559e4a5e05
commit
c4c8e7353f
26 changed files with 300 additions and 82 deletions
|
@ -1,5 +1,9 @@
|
|||
<?
|
||||
use Safe\DateTimeImmutable;
|
||||
use Safe\Exceptions\DatetimeException;
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use Safe\Exceptions\ExecException;
|
||||
|
||||
use function Safe\file_get_contents;
|
||||
use function Safe\filesize;
|
||||
use function Safe\preg_replace;
|
||||
|
@ -27,7 +31,9 @@ class RssFeed extends Feed{
|
|||
|
||||
protected function GetXmlString(): string{
|
||||
if($this->XmlString === null){
|
||||
$feed = Template::RssFeed(['url' => $this->Url, 'description' => $this->Description, 'title' => $this->Title, 'entries' => $this->Entries, 'updated' => (new DateTimeImmutable())->format('r')]);
|
||||
/** @throws void */
|
||||
$timestamp = (new DateTimeImmutable())->format('r');
|
||||
$feed = Template::RssFeed(['url' => $this->Url, 'description' => $this->Description, 'title' => $this->Title, 'entries' => $this->Entries, 'updated' => $timestamp]);
|
||||
|
||||
$this->XmlString = $this->CleanXmlString($feed);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue