@@ -25,29 +25,29 @@ |
||
25 | 25 | 'media' => 'edge_hashtag_to_media.count', |
26 | 26 | 'topPostsOnly' => 'is_top_media_only', |
27 | 27 | |
28 | - 'likes' => function ($data) use (&$likes) { |
|
28 | + 'likes' => function($data) use (&$likes) { |
|
29 | 29 | $likes = ArrayHelper::getColumn(ArrayHelper::getValue($data, 'edge_hashtag_to_top_posts.edges'), 'node.edge_liked_by.count'); |
30 | 30 | sort($likes, SORT_ASC); |
31 | 31 | |
32 | 32 | return array_sum($likes); |
33 | 33 | }, |
34 | - 'minLikes' => function () use (&$likes) { |
|
34 | + 'minLikes' => function() use (&$likes) { |
|
35 | 35 | return $likes['0']; |
36 | 36 | }, |
37 | - 'maxLikes' => function () use (&$likes) { |
|
37 | + 'maxLikes' => function() use (&$likes) { |
|
38 | 38 | return end($likes); |
39 | 39 | }, |
40 | 40 | |
41 | - 'comments' => function ($data) use (&$comments) { |
|
41 | + 'comments' => function($data) use (&$comments) { |
|
42 | 42 | $comments = ArrayHelper::getColumn(ArrayHelper::getValue($data, 'edge_hashtag_to_top_posts.edges'), 'node.edge_media_to_comment.count'); |
43 | 43 | sort($comments, SORT_ASC); |
44 | 44 | |
45 | 45 | return array_sum($comments); |
46 | 46 | }, |
47 | - 'minComments' => function () use (&$comments) { |
|
47 | + 'minComments' => function() use (&$comments) { |
|
48 | 48 | return $comments['0']; |
49 | 49 | }, |
50 | - 'maxComments' => function () use (&$comments) { |
|
50 | + 'maxComments' => function() use (&$comments) { |
|
51 | 51 | return end($comments); |
52 | 52 | }, |
53 | 53 | ], |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | $class = Post::class; |
21 | 21 | $postMap = ArrayHelper::getValue(parent::map(), "$class.item"); |
22 | - array_walk($postMap, function (&$item) { |
|
22 | + array_walk($postMap, function(&$item) { |
|
23 | 23 | $item = "node.{$item}"; |
24 | 24 | }); |
25 | 25 | $postMap['comments'] = 'node.edge_media_to_comment.count'; // fix: likes from sharedData |