From eba4d7aa0ee5ea1bcb29e8254c28a272023ea54f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 21 Apr 2020 18:57:18 +0200 Subject: correct warning psr 12 : 120 characters lines --- app/class/Opt.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'app/class/Opt.php') diff --git a/app/class/Opt.php b/app/class/Opt.php index 0dc99cf..df3cb50 100644 --- a/app/class/Opt.php +++ b/app/class/Opt.php @@ -148,7 +148,8 @@ class Opt extends Item { $tagstring = ""; foreach ($taglist as $tag) { - $tagstring .= '' . $tag . '' . PHP_EOL; + $href = $this->getfilteradress(['tagfilter' => [$tag]]); + $tagstring .= '' . $tag . '' . PHP_EOL; } return $tagstring; } @@ -163,21 +164,24 @@ class Opt extends Item { $authorstring = ""; foreach ($authorlist as $author) { - $authorstring .= '' . $author . '' . PHP_EOL; + $href = $this->getfilteradress(['authorfilter' => [$author]]); + $authorstring .= '' . $author . '\n'; } return $authorstring; } public function securelink(int $level, string $secure) { - return '' . $secure . '' . PHP_EOL; + $href = $this->getfilteradress(['secure' => $level]); + return '' . $secure . '\n'; } public function linktolink(array $linktolist) { $linktostring = ""; foreach ($linktolist as $linkto) { - $linktostring .= '' . $linkto . '' . PHP_EOL; + $href = $this->getfilteradress(['linkto' => $linkto]); + $linktostring .= '' . $linkto . '\n'; } return $linktostring; } @@ -185,7 +189,17 @@ class Opt extends Item public function getfilteradress(array $vars = []) { - $varlist = ['sortby', 'order', 'secure', 'tagfilter', 'tagcompare', 'authorfilter', 'authorcompare', 'linkto', 'invert', 'limit']; + $varlist = [ + 'sortby', + 'order', + 'secure', + 'tagfilter', + 'tagcompare', + 'authorfilter', + 'authorcompare', + 'linkto', 'invert', + 'limit' + ]; // array_filter($vars, function ()) $object = $this->drylist($varlist); $object = array_merge($object, $vars); -- cgit v1.2.3