From e162126f514f45fff386996df83fd49e8493d345 Mon Sep 17 00:00:00 2001 From: Egor Martynov Date: Tue, 18 Jul 2023 21:12:04 +0500 Subject: [PATCH] fix linter errors --- bridges/DoujinStyleBridge.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/bridges/DoujinStyleBridge.php b/bridges/DoujinStyleBridge.php index 1e3a77270e5..97a26e9fb52 100644 --- a/bridges/DoujinStyleBridge.php +++ b/bridges/DoujinStyleBridge.php @@ -1,6 +1,7 @@ getURI()); $html = defaultLinkTo($html, $this->getURI()); $submissions = $html->find('.gridBox .gridDetails'); foreach ($submissions as $submission) { - $item = array(); + $item = []; $item['uri'] = $submission->find('a', 0)->href; @@ -70,11 +72,11 @@ public function collectData() { $item['content'] = ""; $keys = []; - foreach ($content->find(".pageWrap .pageSpan1") as $key) { - $keys[] = $key->plaintext; + foreach ($content->find('.pageWrap .pageSpan') as $key) { + $keys[] = $key->plaintext; } - $values = $content->find(".pageWrap .pageSpan2"); + $values = $content->find('.pageWrap .pageSpan2'); $metadata = array_combine($keys, $values); $format = 'Unknown'; @@ -89,11 +91,11 @@ public function collectData() { case 'Tags:': $item['categories'] = []; foreach ($value->find('a') as $tag) { - $tag = str_replace("-", "-", $tag->plaintext); + $tag = str_replace('-', '-', $tag->plaintext); $item['categories'][] = $tag; } - $item['content'] .= '
Tags: ' . join(", ", $item['categories']); + $item['content'] .= '
Tags: ' . join(', ', $item['categories']); break; case 'Format:': $item['content'] .= "
Format: $value->plaintext"; @@ -111,10 +113,11 @@ public function collectData() { } } - public function getURI() { + public function getURI() + { $url = self::URI; - switch($this->queriedContext) { + switch ($this->queriedContext) { case 'From search results': $url .= '?p=search&type=blanket'; $url .= '&result=' . $this->getInput('query'); @@ -134,12 +137,12 @@ public function getURI() { if ($this->getInput('ogg') == 1) { $url .= '&format4=on'; } - + break; case 'Randomly selected items': $url .= '?p=random'; + break; } return $url; } } -