Fix PHPStan errors

This commit is contained in:
Yassine Guedidi
2024-01-01 19:51:22 +01:00
parent 083dc630fb
commit 0178c7356d
28 changed files with 63 additions and 194 deletions

View File

@ -287,7 +287,10 @@ class DownloadImages
$iterator = $imagesCrawler->getIterator();
while ($iterator->valid()) {
$srcsetAttribute = $iterator->current()->getAttribute('srcset');
$node = $iterator->current();
\assert($node instanceof \DOMElement);
$srcsetAttribute = $node->getAttribute('srcset');
if ('' !== $srcsetAttribute) {
// Couldn't start with " OR ' OR a white space