mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Enable some additional PHPStan rules and fix some type issues
This commit is contained in:
parent
c9e5026cf4
commit
a019d5e87c
8 changed files with 21 additions and 18 deletions
|
@ -45,7 +45,7 @@ class RssFeed extends Feed{
|
|||
$currentEntries = [];
|
||||
foreach($this->Entries as $entry){
|
||||
/** @var Ebook $entry */
|
||||
$obj = new StdClass();
|
||||
$obj = new stdClass();
|
||||
$obj->Size = (string)filesize(WEB_ROOT . $entry->EpubUrl);
|
||||
$obj->Id = preg_replace('/^url:/ius', '', $entry->Identifier);
|
||||
$currentEntries[] = $obj;
|
||||
|
@ -56,7 +56,7 @@ class RssFeed extends Feed{
|
|||
$xml = new SimpleXMLElement(str_replace('xmlns=', 'ns=', file_get_contents($path)));
|
||||
$xml->registerXPathNamespace('atom', 'http://www.w3.org/2005/Atom');
|
||||
foreach($xml->xpath('/rss/channel/item') ?: [] as $entry){
|
||||
$obj = new StdClass();
|
||||
$obj = new stdClass();
|
||||
foreach($entry->xpath('enclosure') ?: [] as $enclosure){
|
||||
$obj->Size = (string)$enclosure['length'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue