@@ -10,7 +10,7 @@ |
||
| 10 | 10 | use PODEntender\Infrastructure\Domain\Model\FileProcessing\JigsawBuiltOutputFilesRepository; |
| 11 | 11 | use TightenCo\Jigsaw\Jigsaw; |
| 12 | 12 | |
| 13 | -return function (Container $dic, Jigsaw $jigsaw) { |
|
| 13 | +return function(Container $dic, Jigsaw $jigsaw) { |
|
| 14 | 14 | /** @var array $config */ |
| 15 | 15 | $config = $dic->get('config'); |
| 16 | 16 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | ], |
| 55 | 55 | 'collections' => [ |
| 56 | 56 | 'episodes' => [ |
| 57 | - 'path' => function (\TightenCo\Jigsaw\PageVariable $page) { |
|
| 57 | + 'path' => function(\TightenCo\Jigsaw\PageVariable $page) { |
|
| 58 | 58 | $builder = new \PODEntender\Domain\Model\Post\EpisodeSlugBuilder(); |
| 59 | 59 | return $builder->build( |
| 60 | 60 | $page->episode['number'], |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | ->category($configuration->category()); |
| 45 | 45 | |
| 46 | 46 | $episodes = $this->postsRepository->withAudio() |
| 47 | - ->sortByDesc(function (AudioEpisode $episode) { |
|
| 47 | + ->sortByDesc(function(AudioEpisode $episode) { |
|
| 48 | 48 | return $episode->createdAt(); |
| 49 | 49 | }); |
| 50 | 50 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | return $this->postRepository |
| 20 | 20 | ->withAudio() |
| 21 | - ->map(function (AudioEpisode $episode) { |
|
| 21 | + ->map(function(AudioEpisode $episode) { |
|
| 22 | 22 | return $episode->category(); |
| 23 | 23 | }) |
| 24 | 24 | ->unique() |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return $this->postRepository |
| 21 | 21 | ->withAudio() |
| 22 | - ->filter(function (AudioEpisode $episode) use ($category) { |
|
| 22 | + ->filter(function(AudioEpisode $episode) use ($category) { |
|
| 23 | 23 | return is_null($category) || $episode->category() === $category; |
| 24 | 24 | }) |
| 25 | - ->sortByDesc(function (AudioEpisode $episode) { |
|
| 25 | + ->sortByDesc(function(AudioEpisode $episode) { |
|
| 26 | 26 | return $episode->createdAt(); |
| 27 | 27 | }) |
| 28 | 28 | ->take($amount); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | class PostImageCollection extends ArrayObject |
| 9 | 9 | { |
| 10 | 10 | public function __construct(array $images = []) { |
| 11 | - $nonPostImageItems = array_filter($images, function ($postImage) { |
|
| 11 | + $nonPostImageItems = array_filter($images, function($postImage) { |
|
| 12 | 12 | return !$postImage instanceof PostImage; |
| 13 | 13 | }); |
| 14 | 14 | |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | |
| 23 | 23 | $recommended = $this->postRepository |
| 24 | 24 | ->withAudio() |
| 25 | - ->filter(function (AudioEpisode $episode) use ($post) { |
|
| 25 | + ->filter(function(AudioEpisode $episode) use ($post) { |
|
| 26 | 26 | return $post->url() !== $episode->url(); |
| 27 | 27 | }) |
| 28 | - ->sortByDesc(function (AudioEpisode $episode) use ($tags) { |
|
| 28 | + ->sortByDesc(function(AudioEpisode $episode) use ($tags) { |
|
| 29 | 29 | return count(array_intersect($episode->tags() ?? [], $tags)); |
| 30 | 30 | }) |
| 31 | 31 | ->take($amount) |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $jigsaw->setConfig('latestEpisodesPerCategory', $latestEpisodesPerCategory); |
| 30 | 30 | |
| 31 | 31 | $jigsaw->getCollection('episodes') |
| 32 | - ->each(function (PageVariable $page) use ($factory, $recommendationsService) { |
|
| 32 | + ->each(function(PageVariable $page) use ($factory, $recommendationsService) { |
|
| 33 | 33 | // AudioEpisode |
| 34 | 34 | $page->audioEpisode = $factory->newAudioEpisodeFromPageVariable($page); |
| 35 | 35 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | $episodes |
| 19 | 19 | ->groupBy('category') |
| 20 | - ->each(function (PageVariable $episodes, string $category) use ($jigsaw) { |
|
| 20 | + ->each(function(PageVariable $episodes, string $category) use ($jigsaw) { |
|
| 21 | 21 | $jigsaw |
| 22 | 22 | ->getSiteData() |
| 23 | 23 | ->put($category, $episodes); |