Commit 2b7f3b34 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Type Deklarationen für String entfernt, da dies in anderen php Versionen Fehler verursacht hat

parent e060ccae
...@@ -599,7 +599,7 @@ class MetaGer ...@@ -599,7 +599,7 @@ class MetaGer
{ {
return $this->stopWords; return $this->stopWords;
} }
public function getHostCount(String $host) public function getHostCount($host)
{ {
if(isset($this->addedHosts[$host])) if(isset($this->addedHosts[$host]))
{ {
...@@ -609,7 +609,7 @@ class MetaGer ...@@ -609,7 +609,7 @@ class MetaGer
return 0; return 0;
} }
} }
public function addHostCount(String $host) public function addHostCount($host)
{ {
$hash = md5($host); $hash = md5($host);
if(isset($this->addedHosts[$hash])) if(isset($this->addedHosts[$hash]))
...@@ -624,7 +624,7 @@ class MetaGer ...@@ -624,7 +624,7 @@ class MetaGer
{ {
return $this->site; return $this->site;
} }
public function addLink(String $link) public function addLink($link)
{ {
$hash = md5($link); $hash = md5($link);
if(isset($this->addedLinks[$hash])) if(isset($this->addedLinks[$hash]))
...@@ -638,7 +638,7 @@ class MetaGer ...@@ -638,7 +638,7 @@ class MetaGer
} }
} }
public function generateSearchLink(String $fokus) public function generateSearchLink($fokus)
{ {
$requestData = $this->request->except('page'); $requestData = $this->request->except('page');
$requestData['focus'] = $fokus; $requestData['focus'] = $fokus;
...@@ -654,7 +654,7 @@ class MetaGer ...@@ -654,7 +654,7 @@ class MetaGer
return $link; return $link;
} }
public function generateSiteSearchLink(String $host) public function generateSiteSearchLink($host)
{ {
$host = urlencode($host); $host = urlencode($host);
$requestData = $this->request->except('page'); $requestData = $this->request->except('page');
...@@ -664,7 +664,7 @@ class MetaGer ...@@ -664,7 +664,7 @@ class MetaGer
return $link; return $link;
} }
public function generateRemovedHostLink (String $host) public function generateRemovedHostLink ($host)
{ {
$host = urlencode($host); $host = urlencode($host);
$requestData = $this->request->except('page'); $requestData = $this->request->except('page');
...@@ -673,7 +673,7 @@ class MetaGer ...@@ -673,7 +673,7 @@ class MetaGer
return $link; return $link;
} }
public function generateRemovedDomainLink (String $domain) public function generateRemovedDomainLink ($domain)
{ {
$domain = urlencode($domain); $domain = urlencode($domain);
$requestData = $this->request->except('page'); $requestData = $this->request->except('page');
......
...@@ -193,7 +193,7 @@ class Result ...@@ -193,7 +193,7 @@ class Result
} }
} }
private function getStrippedHost (String $link) private function getStrippedHost ($link)
{ {
if(strpos($link, "http") !== 0) if(strpos($link, "http") !== 0)
$link = "http://" . $link; $link = "http://" . $link;
...@@ -201,7 +201,7 @@ class Result ...@@ -201,7 +201,7 @@ class Result
$link = preg_replace("/^www\./si", "", $link); $link = preg_replace("/^www\./si", "", $link);
return $link; return $link;
} }
private function getStrippedLink (String $link) private function getStrippedLink ($link)
{ {
if(strpos($link, "http") !== 0) if(strpos($link, "http") !== 0)
$link = "http://" . $link; $link = "http://" . $link;
...@@ -210,7 +210,7 @@ class Result ...@@ -210,7 +210,7 @@ class Result
return $host . $path; return $host . $path;
} }
private function getStrippedDomain (String $link) private function getStrippedDomain ($link)
{ {
if(preg_match("/([^\.]*\.[^\.]*)$/si", $link, $match)) if(preg_match("/([^\.]*\.[^\.]*)$/si", $link, $match))
{ {
...@@ -221,7 +221,7 @@ class Result ...@@ -221,7 +221,7 @@ class Result
} }
} }
private function generateProxyLink (String $link) private function generateProxyLink ($link)
{ {
if(!$link) if(!$link)
return ""; return "";
......
...@@ -73,7 +73,7 @@ abstract class Searchengine ...@@ -73,7 +73,7 @@ abstract class Searchengine
} }
public abstract function loadResults(String $result); public abstract function loadResults($result);
private function writeRequest () private function writeRequest ()
{ {
...@@ -168,7 +168,7 @@ abstract class Searchengine ...@@ -168,7 +168,7 @@ abstract class Searchengine
return $fp; return $fp;
} }
private function setStatistic(String $key, float $val) private function setStatistic($key, float $val)
{ {
$oldVal = floatval(Redis::hget($this->name, $key)) * $this->uses; $oldVal = floatval(Redis::hget($this->name, $key)) * $this->uses;
...@@ -177,7 +177,7 @@ abstract class Searchengine ...@@ -177,7 +177,7 @@ abstract class Searchengine
$this->$key = $newVal; $this->$key = $newVal;
} }
public function disable(string $sumaFile, string $message) public function disable($sumaFile, $message)
{ {
Log::info($message); Log::info($message);
$xml = simplexml_load_file($sumaFile); $xml = simplexml_load_file($sumaFile);
...@@ -185,7 +185,7 @@ abstract class Searchengine ...@@ -185,7 +185,7 @@ abstract class Searchengine
$xml->saveXML($sumaFile); $xml->saveXML($sumaFile);
} }
public function enable(string $sumaFile, string $message) public function enable($sumaFile, $message)
{ {
Log::info($message); Log::info($message);
$xml = simplexml_load_file($sumaFile); $xml = simplexml_load_file($sumaFile);
......
...@@ -13,7 +13,7 @@ class Allesklar extends Searchengine ...@@ -13,7 +13,7 @@ class Allesklar extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$crawler = new Crawler(utf8_decode($result)); $crawler = new Crawler(utf8_decode($result));
$crawler = $crawler $crawler = $crawler
......
...@@ -12,7 +12,7 @@ class BASE extends Searchengine ...@@ -12,7 +12,7 @@ class BASE extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$title = ""; $title = "";
......
...@@ -13,7 +13,7 @@ class Bing extends Searchengine ...@@ -13,7 +13,7 @@ class Bing extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$crawler = new Crawler($result); $crawler = new Crawler($result);
......
...@@ -12,7 +12,7 @@ class Dmoznebel extends Searchengine ...@@ -12,7 +12,7 @@ class Dmoznebel extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$title = ""; $title = "";
......
...@@ -12,7 +12,7 @@ class Dmoznebel_int extends Searchengine ...@@ -12,7 +12,7 @@ class Dmoznebel_int extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$title = ""; $title = "";
......
...@@ -12,7 +12,7 @@ class Ebay extends Searchengine ...@@ -12,7 +12,7 @@ class Ebay extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
try { try {
$content = simplexml_load_string($result); $content = simplexml_load_string($result);
......
...@@ -12,7 +12,7 @@ class Exalead extends Searchengine ...@@ -12,7 +12,7 @@ class Exalead extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$title = ""; $title = "";
......
...@@ -17,7 +17,7 @@ class Fastbot extends Searchengine ...@@ -17,7 +17,7 @@ class Fastbot extends Searchengine
} }
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$result = utf8_encode($result); $result = utf8_encode($result);
$counter = 0; $counter = 0;
......
...@@ -12,7 +12,7 @@ class Goyax extends Searchengine ...@@ -12,7 +12,7 @@ class Goyax extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
die($result); die($result);
$results = trim($result); $results = trim($result);
......
...@@ -12,7 +12,7 @@ class Mg_hochsch_de extends Searchengine ...@@ -12,7 +12,7 @@ class Mg_hochsch_de extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
die($result); die($result);
$results = trim($result); $results = trim($result);
......
...@@ -12,7 +12,7 @@ class Minisucher extends Searchengine ...@@ -12,7 +12,7 @@ class Minisucher extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $content) public function loadResults ($content)
{ {
$content = simplexml_load_string($content); $content = simplexml_load_string($content);
if(!$content) if(!$content)
......
...@@ -13,7 +13,7 @@ class Mnogosearch extends Searchengine ...@@ -13,7 +13,7 @@ class Mnogosearch extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$counter = 0; $counter = 0;
$crawler = new Crawler($result); $crawler = new Crawler($result);
......
...@@ -12,7 +12,7 @@ class Nebel extends Searchengine ...@@ -12,7 +12,7 @@ class Nebel extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$results = trim($result); $results = trim($result);
foreach( explode("\n", $results) as $result ) foreach( explode("\n", $results) as $result )
......
...@@ -12,7 +12,7 @@ class Onenewspage extends Searchengine ...@@ -12,7 +12,7 @@ class Onenewspage extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$results = trim($result); $results = trim($result);
......
...@@ -13,7 +13,7 @@ class Onenewspagegermany extends Searchengine ...@@ -13,7 +13,7 @@ class Onenewspagegermany extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$counter = 0; $counter = 0;
foreach( explode("\n", $result) as $line ) foreach( explode("\n", $result) as $line )
......
...@@ -12,7 +12,7 @@ class Onenewspagevideo extends Searchengine ...@@ -12,7 +12,7 @@ class Onenewspagevideo extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
$results = trim($result); $results = trim($result);
foreach( explode("\n", $results) as $result ) foreach( explode("\n", $results) as $result )
......
...@@ -12,7 +12,7 @@ class Opencrawlastronomie extends Searchengine ...@@ -12,7 +12,7 @@ class Opencrawlastronomie extends Searchengine
parent::__construct($engine, $metager); parent::__construct($engine, $metager);
} }
public function loadResults (String $result) public function loadResults ($result)
{ {
try { try {
$content = simplexml_load_string($result); $content = simplexml_load_string($result);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment