aboutsummaryrefslogtreecommitdiff
path: root/bridges/TheYeteeBridge.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2022-07-01 15:10:30 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-01 15:10:30 +0200
commit4f75591060d95208a301bc6bf460d875631b29cc (patch)
tree4e37d86840e8d990a563ba75d3de6f84a53cc2de /bridges/TheYeteeBridge.php
parent66568e3a39c61546c09a47a5688914a0bdf3c60c (diff)
downloadrss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.gz
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.zst
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.zip
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
Diffstat (limited to 'bridges/TheYeteeBridge.php')
-rw-r--r--bridges/TheYeteeBridge.php72
1 files changed, 36 insertions, 36 deletions
diff --git a/bridges/TheYeteeBridge.php b/bridges/TheYeteeBridge.php
index b7867ae9..5c7d8856 100644
--- a/bridges/TheYeteeBridge.php
+++ b/bridges/TheYeteeBridge.php
@@ -1,39 +1,39 @@
<?php
-class TheYeteeBridge extends BridgeAbstract {
- const MAINTAINER = 'Monsieur Poutounours';
- const NAME = 'TheYetee';
- const URI = 'https://theyetee.com';
- const CACHE_TIMEOUT = 14400; // 4 h
- const DESCRIPTION = 'Fetch daily shirts from The Yetee';
-
- public function collectData(){
-
- $html = getSimpleHTMLDOM(self::URI);
-
- $div = $html->find('.module_timed-item.is--full');
- foreach($div as $element) {
-
- $item = array();
- $item['enclosures'] = array();
-
- $title = $element->find('h2', 0)->plaintext;
- $item['title'] = $title;
-
- $author = trim($element->find('.module_timed-item--artist a', 0)->plaintext);
- $item['author'] = $author;
-
- $item['uri'] = static::URI;
-
- $content = '<p>' . $title . ' by ' . $author . '</p>';
- $photos = $element->find('a.img');
- foreach($photos as $photo) {
- $content = $content . "<br /><img src='$photo->href' />";
- $item['enclosures'][] = $photo->src;
- }
- $item['content'] = $content;
-
- $this->items[] = $item;
- }
- }
+class TheYeteeBridge extends BridgeAbstract
+{
+ const MAINTAINER = 'Monsieur Poutounours';
+ const NAME = 'TheYetee';
+ const URI = 'https://theyetee.com';
+ const CACHE_TIMEOUT = 14400; // 4 h
+ const DESCRIPTION = 'Fetch daily shirts from The Yetee';
+
+ public function collectData()
+ {
+ $html = getSimpleHTMLDOM(self::URI);
+
+ $div = $html->find('.module_timed-item.is--full');
+ foreach ($div as $element) {
+ $item = [];
+ $item['enclosures'] = [];
+
+ $title = $element->find('h2', 0)->plaintext;
+ $item['title'] = $title;
+
+ $author = trim($element->find('.module_timed-item--artist a', 0)->plaintext);
+ $item['author'] = $author;
+
+ $item['uri'] = static::URI;
+
+ $content = '<p>' . $title . ' by ' . $author . '</p>';
+ $photos = $element->find('a.img');
+ foreach ($photos as $photo) {
+ $content = $content . "<br /><img src='$photo->href' />";
+ $item['enclosures'][] = $photo->src;
+ }
+ $item['content'] = $content;
+
+ $this->items[] = $item;
+ }
+ }
}