Normalize some method calls (#2911)

The methods were called as static even though they were not.
This commit is contained in:
Jan Tojnar 2022-07-09 08:13:07 +02:00 committed by GitHub
parent a966213cd7
commit e07a94d480
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 12 deletions

View file

@ -36,7 +36,7 @@ class AsahiShimbunAJWBridge extends BridgeAbstract
private function getSectionURI($section)
{
return self::getURI() . $section . '/';
return $this->getURI() . $section . '/';
}
public function collectData()

View file

@ -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) {

View file

@ -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)];

View file

@ -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) {

View file

@ -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':

View file

@ -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) {

View file

@ -53,7 +53,7 @@ class RobinhoodSnacksBridge extends BridgeAbstract
'uri' => $uri,
'title' => $title,
'timestamp' => $timestamp,
'content' => self::getArticleContent($uri)
'content' => $this->getArticleContent($uri)
];
}
}

View file

@ -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 */

View file

@ -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) {

View file

@ -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 = [];