diff --git a/bridges/NordbayernBridge.php b/bridges/NordbayernBridge.php index 6aa2d5a9..52b1f3ec 100644 --- a/bridges/NordbayernBridge.php +++ b/bridges/NordbayernBridge.php @@ -47,15 +47,6 @@ class NordbayernBridge extends BridgeAbstract { ) )); - private function startsWith($string, $startString) { - $len = strlen($startString); - return (substr($string, 0, $len) === $startString); - } - - private function contains($haystack, $needle) { - return (strpos($haystack, $needle) !== false); - } - private function getUseFullContent($rawContent) { $content = ''; foreach($rawContent->children as $element) { @@ -109,7 +100,7 @@ class NordbayernBridge extends BridgeAbstract { // exclude police reports if descired if($this->getInput('policeReports') || - !self::contains($item['content'], 'Hier geht es zu allen aktuellen Polizeimeldungen.')) { + !str_contains($item['content'], 'Hier geht es zu allen aktuellen Polizeimeldungen.')) { $this->items[] = $item; } diff --git a/lib/php8backports.php b/lib/php8backports.php new file mode 100644 index 00000000..aa68b77a --- /dev/null +++ b/lib/php8backports.php @@ -0,0 +1,32 @@ +