@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | private function filterNull(array $object): array |
136 | 136 | { |
137 | - return array_filter($object, function ($val) { |
|
137 | + return array_filter($object, function($val) { |
|
138 | 138 | return null !== $val; |
139 | 139 | }); |
140 | 140 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @return array|null |
24 | 24 | */ |
25 | - public function getEventInfo(int $id): ?array |
|
25 | + public function getEventInfo(int $id): ? array |
|
26 | 26 | { |
27 | 27 | $node = $this->crawlEvent($id); |
28 | 28 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $bandNode = $node->filter('.grid-items'); |
58 | 58 | |
59 | - return $bandNode->filter('.grid-items-item')->each(function (Crawler $node): array { |
|
59 | + return $bandNode->filter('.grid-items-item')->each(function(Crawler $node): array { |
|
60 | 60 | return [ |
61 | 61 | 'image' => $this->parseImage($node->filter('.grid-items-cover-image-image img')), |
62 | 62 | 'name' => $this->parseString($node->filter('.grid-items-item-main-text')), |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @return int[]|null |
22 | 22 | */ |
23 | - public function getUserYears(string $username): ?array |
|
23 | + public function getUserYears(string $username): ? array |
|
24 | 24 | { |
25 | 25 | $node = $this->crawlEventList($username); |
26 | 26 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | $years = $node->filter('.content-top .secondary-nav-item-link') |
32 | - ->each(function (Crawler $node) { |
|
32 | + ->each(function(Crawler $node) { |
|
33 | 33 | return (int) trim($node->text()); |
34 | 34 | }); |
35 | 35 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return array|null |
50 | 50 | */ |
51 | - public function getEvents(string $username, ?int $year, int $page = 1): ?array |
|
51 | + public function getEvents(string $username, ?int $year, int $page = 1) : ? array |
|
52 | 52 | { |
53 | 53 | $node = $this->crawlEventList($username, $year, $page); |
54 | 54 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return null; |
57 | 57 | } |
58 | 58 | |
59 | - return $node->filter('.events-list-item')->each(function (Crawler $node): array { |
|
59 | + return $node->filter('.events-list-item')->each(function(Crawler $node): array { |
|
60 | 60 | $eventNode = $node->filter('.events-list-item-event--title a'); |
61 | 61 | |
62 | 62 | $url = $this->parseUrl($eventNode); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @return int|null |
81 | 81 | */ |
82 | - public function getYearPages(string $username, ?int $year): ?int |
|
82 | + public function getYearPages(string $username, ?int $year) : ?int |
|
83 | 83 | { |
84 | 84 | $node = $this->crawlEventList($username, $year); |
85 | 85 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @return int|null |
101 | 101 | */ |
102 | - public function getYearCount(string $username, ?int $year, int $page = 1): ?int |
|
102 | + public function getYearCount(string $username, ?int $year, int $page = 1) : ?int |
|
103 | 103 | { |
104 | 104 | $node = $this->crawlEventList($username, $year, $page); |
105 | 105 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @return Crawler|null |
156 | 156 | */ |
157 | - private function crawlEventList(string $username, ?int $year = null, int $page = 1): ?Crawler |
|
157 | + private function crawlEventList(string $username, ?int $year = null, int $page = 1) : ?Crawler |
|
158 | 158 | { |
159 | 159 | $url = 'http://www.last.fm/user/'.$username.'/events/'.($year ?: '').'?page='.$page; |
160 | 160 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * (c) Christian Gripp <[email protected]> |