1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 03:24:01 +02:00

refactor: prepare for PSR2 (#2859)

This commit is contained in:
Dag
2022-06-24 18:29:35 +02:00
committed by GitHub
parent d2313bddcc
commit 5076d09de6
24 changed files with 140 additions and 146 deletions

View File

@@ -43,10 +43,10 @@ class BAEBridge extends BridgeAbstract {
$content = $htmlDetail->find('article p', 0)->innertext;
if (!empty($this->getInput('keyword'))) {
$keyword = $this->remove_accents(strtolower($this->getInput('keyword')));
$cleanTitle = $this->remove_accents(strtolower($item['title']));
$keyword = $this->removeAccents(strtolower($this->getInput('keyword')));
$cleanTitle = $this->removeAccents(strtolower($item['title']));
if (strpos($cleanTitle, $keyword) === false) {
$cleanContent = $this->remove_accents(strtolower($content));
$cleanContent = $this->removeAccents(strtolower($content));
if (strpos($cleanContent, $keyword) === false) {
continue;
}
@@ -79,7 +79,7 @@ class BAEBridge extends BridgeAbstract {
return $uri;
}
private function remove_accents($string) {
private function removeAccents($string) {
$chars = array(
// Decompositions for Latin-1 Supplement
'ª' => 'a', 'º' => 'o',