From 7c16be045786e82af22f3661bc49084d33a4b144 Mon Sep 17 00:00:00 2001 From: Steve Worley Date: Thu, 22 Apr 2021 08:48:38 +1000 Subject: [PATCH] lint. --- src/Crawler/Group/ElementFilter.php | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/Crawler/Group/ElementFilter.php b/src/Crawler/Group/ElementFilter.php index 9683e3a..0317d21 100644 --- a/src/Crawler/Group/ElementFilter.php +++ b/src/Crawler/Group/ElementFilter.php @@ -19,8 +19,14 @@ class ElementFilter extends GroupBase { + /** + * The filtered type - used to separate output by id. + * + * @var string + */ protected $filter_type; + /** * {@inheritdoc} */ @@ -28,7 +34,9 @@ public function __construct(array $config=[]) { parent::__construct($config); $this->filter_type = NULL; - } + + }//end __construct() + /** * {@inheritdoc} @@ -42,7 +50,9 @@ public function getId() : string } return $id; - } + + }//end getId() + /** * {@inheritdoc} @@ -75,15 +85,18 @@ public function match($url, ResponseInterface $response) : bool return FALSE; } - $types = $element->each(function(Crawler $node) use ($filter_attr, $pattern) { - preg_match($pattern, $node->attr($filter_attr), $matches); - return reset($matches); - }); + $types = $element->each( + function(Crawler $node) use ($filter_attr, $pattern) { + preg_match($pattern, $node->attr($filter_attr), $matches); + return reset($matches); + } + ); $this->filter_type = reset($types); return TRUE; - } + + }//end match() -} +}//end class