mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-21 17:15:25 +03:00
Normalize some method calls (#2911)
The methods were called as static even though they were not.
This commit is contained in:
parent
a966213cd7
commit
e07a94d480
10 changed files with 12 additions and 12 deletions
|
@ -36,7 +36,7 @@ class AsahiShimbunAJWBridge extends BridgeAbstract
|
|||
|
||||
private function getSectionURI($section)
|
||||
{
|
||||
return self::getURI() . $section . '/';
|
||||
return $this->getURI() . $section . '/';
|
||||
}
|
||||
|
||||
public function collectData()
|
||||
|
|
|
@ -62,7 +62,7 @@ class DiarioDeNoticiasBridge extends BridgeAbstract
|
|||
|
||||
public function collectData()
|
||||
{
|
||||
$archives = self::getURI();
|
||||
$archives = $this->getURI();
|
||||
$html = getSimpleHTMLDOMCached($archives);
|
||||
|
||||
foreach ($html->find('article') as $element) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class IndiegogoBridge extends BridgeAbstract
|
|||
public function collectData()
|
||||
{
|
||||
$url = 'https://www.indiegogo.com/private_api/discover';
|
||||
$data_array = self::getCategories();
|
||||
$data_array = $this->getCategories();
|
||||
|
||||
$header = ['Content-type: application/json'];
|
||||
$opts = [CURLOPT_POSTFIELDS => json_encode($data_array)];
|
||||
|
|
|
@ -34,7 +34,7 @@ class JornalDeNoticiasBridge extends BridgeAbstract
|
|||
|
||||
public function collectData()
|
||||
{
|
||||
$archives = self::getURI();
|
||||
$archives = $this->getURI();
|
||||
$html = getSimpleHTMLDOMCached($archives);
|
||||
|
||||
foreach ($html->find('article') as $element) {
|
||||
|
|
|
@ -83,7 +83,7 @@ class NovayaGazetaEuropeBridge extends BridgeAbstract
|
|||
}
|
||||
}
|
||||
|
||||
private function convertBody($data)
|
||||
private static function convertBody($data)
|
||||
{
|
||||
$body = '';
|
||||
if ($data->previewUrl !== null && !$data->isPreviewHidden) {
|
||||
|
@ -104,7 +104,7 @@ class NovayaGazetaEuropeBridge extends BridgeAbstract
|
|||
return $body;
|
||||
}
|
||||
|
||||
private function convertElement($datum)
|
||||
private static function convertElement($datum)
|
||||
{
|
||||
switch ($datum->type) {
|
||||
case 'text':
|
||||
|
|
|
@ -21,7 +21,7 @@ class PanacheDigitalGamesBridge extends BridgeAbstract
|
|||
|
||||
public function collectData()
|
||||
{
|
||||
$articles = self::getURI();
|
||||
$articles = $this->getURI();
|
||||
$html = getSimpleHTMLDOMCached($articles);
|
||||
|
||||
foreach ($html->find('.news-item') as $element) {
|
||||
|
|
|
@ -53,7 +53,7 @@ class RobinhoodSnacksBridge extends BridgeAbstract
|
|||
'uri' => $uri,
|
||||
'title' => $title,
|
||||
'timestamp' => $timestamp,
|
||||
'content' => self::getArticleContent($uri)
|
||||
'content' => $this->getArticleContent($uri)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class SIMARBridge extends BridgeAbstract
|
|||
|
||||
public function collectData()
|
||||
{
|
||||
$html = getSimpleHTMLDOM(self::getURI());
|
||||
$html = getSimpleHTMLDOM($this->getURI());
|
||||
$e_home = $html->find('#home', 0)
|
||||
or returnServerError('Invalid site structure');
|
||||
|
||||
|
@ -40,7 +40,7 @@ class SIMARBridge extends BridgeAbstract
|
|||
$item = [];
|
||||
|
||||
$item['title'] = 'Intervenção: ' . $element->plaintext;
|
||||
$item['uri'] = self::getURI() . $element->href;
|
||||
$item['uri'] = $this->getURI() . $element->href;
|
||||
$item['content'] = $element->innertext;
|
||||
|
||||
/* Try to get the actual contents for this kind of item */
|
||||
|
|
|
@ -38,7 +38,7 @@ class TinyLetterBridge extends BridgeAbstract
|
|||
|
||||
public function collectData()
|
||||
{
|
||||
$archives = self::getURI() . '/archive';
|
||||
$archives = $this->getURI() . '/archive';
|
||||
$html = getSimpleHTMLDOMCached($archives);
|
||||
|
||||
foreach ($html->find('.message-list li') as $element) {
|
||||
|
|
|
@ -39,7 +39,7 @@ class TwitterEngineeringBridge extends FeedExpander
|
|||
return $item;
|
||||
}
|
||||
|
||||
private function getCategoriesFromTags($article_html)
|
||||
private static function getCategoriesFromTags($article_html)
|
||||
{
|
||||
$tags_list_items = [$article_html->find('.post__tags > ul > li')];
|
||||
$categories = [];
|
||||
|
|
Loading…
Reference in a new issue