@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @return mixed |
|
| 46 | + * @return string|false |
|
| 47 | 47 | */ |
| 48 | 48 | public function getHost() |
| 49 | 49 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | - * @return mixed |
|
| 54 | + * @return string|false |
|
| 55 | 55 | */ |
| 56 | 56 | public function getSchema() |
| 57 | 57 | { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public static function getAbsoluteLink(Url $baseUrl, $link) |
| 38 | 38 | { |
| 39 | - if (! $link) { |
|
| 39 | + if (!$link) { |
|
| 40 | 40 | return $baseUrl->getWebUrl(); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @return bool |
| 87 | 87 | */ |
| 88 | 88 | public static function isSingleSlashed($link) { |
| 89 | - return (! self::isDoubleSlashed($link)) && $link[0] === '/'; |
|
| 89 | + return (!self::isDoubleSlashed($link)) && $link[0] === '/'; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public static function buildUrl(Url $baseUrl, $partial) |
| 106 | 106 | { |
| 107 | - return rtrim($baseUrl->getWebUrl(), '/') .'/'. ltrim($partial, '/'); |
|
| 107 | + return rtrim($baseUrl->getWebUrl(), '/').'/'.ltrim($partial, '/'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public static function addSchema(Url $baseUrl, $partial) |
| 116 | 116 | { |
| 117 | - return $baseUrl->getSchema() .':'. $partial; |
|
| 117 | + return $baseUrl->getSchema().':'.$partial; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -124,6 +124,6 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public static function addSchemaAndHost(Url $baseUrl, $partial) |
| 126 | 126 | { |
| 127 | - return $baseUrl->getSchema() .'://'. $baseUrl->getHost() .'/'. ltrim($partial, '/'); |
|
| 127 | + return $baseUrl->getSchema().'://'.$baseUrl->getHost().'/'.ltrim($partial, '/'); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | \ No newline at end of file |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function getContent() |
| 57 | 57 | { |
| 58 | - if (! $this->content) { |
|
| 58 | + if (!$this->content) { |
|
| 59 | 59 | $this->content = (string) $this->fetchContent(); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function shouldVisit(Url $url) |
| 26 | 26 | { |
| 27 | 27 | if (preg_match_all( |
| 28 | - "/" . self::FILTER . "/siU", |
|
| 28 | + "/".self::FILTER."/siU", |
|
| 29 | 29 | $url->getWebUrl(), |
| 30 | 30 | $matches, |
| 31 | 31 | PREG_SET_ORDER |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public function addUrl($url, $frequency = SiteMapUrl::DAILY, $priority = 0.3) |
| 93 | 93 | { |
| 94 | - if (! $url instanceof Url) { |
|
| 94 | + if (!$url instanceof Url) { |
|
| 95 | 95 | $url = new Url((string) $url); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | public function next() |
| 97 | 97 | { |
| 98 | - $this->index ++; |
|
| 98 | + $this->index++; |
|
| 99 | 99 | //return next($this->elements); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function __construct($fileName) |
| 28 | 28 | { |
| 29 | - $this->fileName = (string)$fileName; |
|
| 29 | + $this->fileName = (string) $fileName; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function write($content) |
| 21 | 21 | { |
| 22 | - echo $content . "\n"; |
|
| 22 | + echo $content."\n"; |
|
| 23 | 23 | return true; |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | \ No newline at end of file |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | private function findAllLinks() { |
| 62 | 62 | if (empty($this->pages) && preg_match_all( |
| 63 | - "/" . self::REGEX . "/siU", |
|
| 63 | + "/".self::REGEX."/siU", |
|
| 64 | 64 | $this->webPageContent, |
| 65 | 65 | $matches, |
| 66 | 66 | PREG_SET_ORDER |