mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-12 19:44:12 +02:00
[phpcs] enforce single quotes (#732)
* [phpcs] Add rule to enforce single quoted strings
This commit is contained in:
@@ -19,26 +19,26 @@ class GoComicsBridge extends BridgeAbstract {
|
||||
or returnServerError('Could not request GoComics: ' . $this->getURI());
|
||||
|
||||
//Get info from first page
|
||||
$author = preg_replace('/By /', '', $html->find(".media-subheading", 0)->plaintext);
|
||||
$author = preg_replace('/By /', '', $html->find('.media-subheading', 0)->plaintext);
|
||||
|
||||
$link = self::URI . $html->find(".gc-deck--cta-0", 0)->find('a', 0)->href;
|
||||
$link = self::URI . $html->find('.gc-deck--cta-0', 0)->find('a', 0)->href;
|
||||
for($i = 0; $i < 5; $i++) {
|
||||
|
||||
$item = array();
|
||||
|
||||
$page = getSimpleHTMLDOM($link)
|
||||
or returnServerError('Could not request GoComics: ' . $link);
|
||||
$imagelink = $page->find(".img-fluid", 1)->src;
|
||||
$date = explode("/", $link);
|
||||
$imagelink = $page->find('.img-fluid', 1)->src;
|
||||
$date = explode('/', $link);
|
||||
|
||||
$item['id'] = $imagelink;
|
||||
$item['uri'] = $link;
|
||||
$item['author'] = $author;
|
||||
$item['title'] = 'GoComics ' . $this->getInput('comicname');
|
||||
$item['timestamp'] = DateTime::createFromFormat("Ymd", $date[5] . $date[6] . $date[7])->getTimestamp();
|
||||
$item['timestamp'] = DateTime::createFromFormat('Ymd', $date[5] . $date[6] . $date[7])->getTimestamp();
|
||||
$item['content'] = '<img src="' . $imagelink . '" />';
|
||||
|
||||
$link = self::URI . $page->find(".js-previous-comic", 0)->href;
|
||||
$link = self::URI . $page->find('.js-previous-comic', 0)->href;
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user