Skip to content

Commit

Permalink
Removed useless check in crawler for user event years
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Feb 24, 2017
1 parent eb6212b commit 4c511aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Crawler/EventListCrawler.php
Expand Up @@ -24,11 +24,10 @@ public function getUserYears(string $username): array
{
$node = $this->crawlEventList($username);

$years = $node->filter('.content-top .secondary-nav-item-link')->each(function (Crawler $node, $i): array {
if ($i > 0) {
$years = $node->filter('.content-top .secondary-nav-item-link')
->each(function (Crawler $node, $i) {
return (int) trim($node->text());
}
});
});

sort($years);
array_shift($years);
Expand Down

0 comments on commit 4c511aa

Please sign in to comment.