mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 10:04:54 +02:00
refactor: prepare for PSR2 (#2859)
This commit is contained in:
parent
d2313bddcc
commit
5076d09de6
24 changed files with 140 additions and 146 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue