@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | return |
31 | 31 | $url['scheme'] . '://' |
32 | - .((isset($url['user'])) ? $url['user'] . ((isset($url['pass'])) ? ':' . $url['pass'] : '') .'@' : '') |
|
32 | + .((isset($url['user'])) ? $url['user'] . ((isset($url['pass'])) ? ':' . $url['pass'] : '') . '@' : '') |
|
33 | 33 | .$url['host'] |
34 | 34 | .((isset($url['port'])) ? ':' . $url['port'] : '') |
35 | 35 | .((isset($url['path'])) ? $url['path'] : '') |
@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function __construct(string $loc) |
53 | 53 | { |
54 | - $this->loc = '/'.ltrim($loc, '/'); |
|
54 | + $this->loc = '/' . ltrim($loc, '/'); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -63,7 +63,7 @@ |
||
63 | 63 | */ |
64 | 64 | public function __construct(string $loc) |
65 | 65 | { |
66 | - $this->loc = '/'.ltrim($loc, '/'); |
|
66 | + $this->loc = '/' . ltrim($loc, '/'); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function __construct($thumbnailLoc, $title, $description) |
172 | 172 | { |
173 | - $this->thumbnailLoc = '/'.ltrim($thumbnailLoc, '/'); |
|
173 | + $this->thumbnailLoc = '/' . ltrim($thumbnailLoc, '/'); |
|
174 | 174 | $this->title = mb_substr($title, 0, 100); |
175 | 175 | $this->description = mb_substr($description, 0, 2048); |
176 | 176 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | $accepted = ['allow', 'deny']; |
181 | 181 | |
182 | - return (bool)in_array($value, $accepted); |
|
182 | + return (bool) in_array($value, $accepted); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function setPlayerLoc(string $playerLoc, $allowEmbed = null): self |
202 | 202 | { |
203 | - $playerLoc = '/'.ltrim($playerLoc, '/'); |
|
203 | + $playerLoc = '/' . ltrim($playerLoc, '/'); |
|
204 | 204 | |
205 | 205 | if (!empty($playerLoc)) { |
206 | 206 | if ($allowEmbed !== null) { |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function setContentLoc(string $contentLoc): self |
276 | 276 | { |
277 | - $this->contentLoc = '/'.ltrim($contentLoc, '/'); |
|
277 | + $this->contentLoc = '/' . ltrim($contentLoc, '/'); |
|
278 | 278 | |
279 | 279 | return $this; |
280 | 280 | } |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | public function getUploader() |
647 | 647 | { |
648 | 648 | if (is_array($this->uploader)) { |
649 | - return [array_key_first($this->uploader) => $this->getDomain().$this->uploader[array_key_first($this->uploader)]]; |
|
649 | + return [array_key_first($this->uploader) => $this->getDomain() . $this->uploader[array_key_first($this->uploader)]]; |
|
650 | 650 | } |
651 | 651 | |
652 | 652 | return $this->uploader; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->endFile(); |
202 | 202 | } |
203 | 203 | |
204 | - private function addElement(string $element, $value, string $namespace = null ): void |
|
204 | + private function addElement(string $element, $value, string $namespace = null): void |
|
205 | 205 | { |
206 | 206 | if ($namespace) { |
207 | 207 | $begin = $namespace . ':'; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $begin = ''; |
210 | 210 | } |
211 | 211 | if (!is_array($value)) { |
212 | - $this->getXMLWriter()->writeElement($begin . $element, (string)$value); |
|
212 | + $this->getXMLWriter()->writeElement($begin . $element, (string) $value); |
|
213 | 213 | } else { |
214 | 214 | if (isset($value['_namespace'])) { |
215 | 215 | $this->getXMLWriter()->startElementNS($value['_namespace'], $value['_element'], null); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $this->addElement($el, $val); |
244 | 244 | } |
245 | 245 | } else { |
246 | - $this->getXMLWriter()->text((string)$value['_value']); |
|
246 | + $this->getXMLWriter()->text((string) $value['_value']); |
|
247 | 247 | } |
248 | 248 | } |
249 | 249 | } else { |
@@ -553,9 +553,11 @@ |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | if ($filesInGroup >= self::ITEM_PER_SITEMAP || |
556 | - $this->getXml()->getSitemapSize() >= (self::SITEMAP_MAX_SIZE - 20)) // 20 chars buffer for close tag |
|
556 | + $this->getXml()->getSitemapSize() >= (self::SITEMAP_MAX_SIZE - 20)) { |
|
557 | + // 20 chars buffer for close tag |
|
557 | 558 | { |
558 | 559 | $this->getXml()->closeSitemap(); |
560 | + } |
|
559 | 561 | |
560 | 562 | if (!$this->getDataCollector()->isLast($group)) { |
561 | 563 | $groupNo++; |
@@ -53,6 +53,6 @@ |
||
53 | 53 | $a->addItem($item); |
54 | 54 | $a->generate(); |
55 | 55 | } catch (Exception $e) { |
56 | - echo $e->getMessage().PHP_EOL; |
|
57 | - echo $e->getFile()." : ".$e->getLine().PHP_EOL; |
|
56 | + echo $e->getMessage() . PHP_EOL; |
|
57 | + echo $e->getFile() . " : " . $e->getLine() . PHP_EOL; |
|
58 | 58 | } |
59 | 59 | \ No newline at end of file |