mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-11 02:54:10 +02:00
[.travis] Fix several phpcs and phpunit errors (#1799)
This commit is contained in:
@@ -7,9 +7,9 @@ class MondeDiploBridge extends BridgeAbstract {
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = 'Returns most recent results from MondeDiplo.';
|
||||
|
||||
private function cleanText($text) {
|
||||
return trim(str_replace([' ', ' '], ' ', $text));
|
||||
}
|
||||
private function cleanText($text) {
|
||||
return trim(str_replace(array(' ', ' '), ' ', $text));
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
$html = getSimpleHTMLDOM(self::URI)
|
||||
@@ -22,7 +22,7 @@ class MondeDiploBridge extends BridgeAbstract {
|
||||
$item = array();
|
||||
$item['uri'] = self::URI . $element->href;
|
||||
$item['title'] = $this->cleanText($title) . ' - ' . $this->cleanText($datesAuteurs);
|
||||
$item['content'] = $this->cleanText(str_replace([$title, $datesAuteurs], '', $element->plaintext));
|
||||
$item['content'] = $this->cleanText(str_replace(array($title, $datesAuteurs), '', $element->plaintext));
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
|
Reference in New Issue
Block a user