[ZeitBridge] Fix linting

This commit is contained in:
Mynacol 2024-05-18 16:18:23 +02:00
parent 4d12aa2a9e
commit 7bde7a56f9

View File

@ -87,7 +87,9 @@ class ZeitBridge extends FeedExpander
// remove known bad elements // remove known bad elements
foreach ( foreach (
$article->find( $article->find(
'aside, .visually-hidden, .carousel-container, #tickaroo-liveblog, .zplus-badge, .article-heading__container--podcast, .podcast-player__image, div[data-paywall], .js-embed-consent, script, nav, .article-flexible-toc__subheading-link, .faq-link' 'aside, .visually-hidden, .carousel-container, #tickaroo-liveblog, .zplus-badge,
.article-heading__container--podcast, .podcast-player__image, div[data-paywall],
.js-embed-consent, script, nav, .article-flexible-toc__subheading-link, .faq-link'
) as $bad ) as $bad
) { ) {
$bad->remove(); $bad->remove();
@ -110,7 +112,9 @@ class ZeitBridge extends FeedExpander
// authors // authors
$authors = $article->find('*[itemtype*="schema.org/Person"]') ?? $article->find('.metadata__source'); $authors = $article->find('*[itemtype*="schema.org/Person"]') ?? $article->find('.metadata__source');
if ($authors) { if ($authors) {
$item['author'] = implode(', ', array_map(function ($e) { return trim($e->plaintext); }, $authors)); $item['author'] = implode(', ', array_map(function ($e) {
return trim($e->plaintext);
}, $authors));
} }
// header image // header image