@@ -71,7 +71,7 @@ |
||
| 71 | 71 | |
| 72 | 72 | private function getRelated(PackageInterface $package): RelatedArticleList |
| 73 | 73 | { |
| 74 | - $relatedItemsGroups = $package->getGroups()->filter(static function ($group) { |
|
| 74 | + $relatedItemsGroups = $package->getGroups()->filter(static function($group) { |
|
| 75 | 75 | return GroupInterface::TYPE_RELATED === $group->getType(); |
| 76 | 76 | }); |
| 77 | 77 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $items = $this->filterTextItems($package->getItems()); |
| 90 | 90 | |
| 91 | 91 | $map = $items->map( |
| 92 | - static function (ItemInterface $item) { |
|
| 92 | + static function(ItemInterface $item) { |
|
| 93 | 93 | return ' '.$item->getDescription(); |
| 94 | 94 | } |
| 95 | 95 | ); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | { |
| 105 | 105 | $items = $this->filterTextItems($package->getItems()); |
| 106 | 106 | |
| 107 | - $authors = array_filter(array_values(array_map(static function (ItemInterface $item) { |
|
| 107 | + $authors = array_filter(array_values(array_map(static function(ItemInterface $item) { |
|
| 108 | 108 | $metadata = $item->getMetadata(); |
| 109 | 109 | |
| 110 | 110 | return $metadata['byline']; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | private function filterTextItems(Collection $items): Collection |
| 121 | 121 | { |
| 122 | 122 | return $items->filter( |
| 123 | - function (ItemInterface $item) { |
|
| 123 | + function(ItemInterface $item) { |
|
| 124 | 124 | $this->ensureTypeIsAllowed($item->getType()); |
| 125 | 125 | |
| 126 | 126 | return ItemInterface::TYPE_TEXT === $item->getType(); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | private function populateBody(PackageInterface $package): string |
| 132 | 132 | { |
| 133 | - return $package->getBody().' '.implode('', array_map(function (ItemInterface $item) { |
|
| 133 | + return $package->getBody().' '.implode('', array_map(function(ItemInterface $item) { |
|
| 134 | 134 | $this->ensureTypeIsAllowed($item->getType()); |
| 135 | 135 | |
| 136 | 136 | return $item->getBody(); |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | private function findOriginalRendition(ItemInterface $item): RenditionInterface |
| 168 | 168 | { |
| 169 | 169 | return $item->getRenditions()->filter( |
| 170 | - static function (RenditionInterface $rendition) { |
|
| 170 | + static function(RenditionInterface $rendition) { |
|
| 171 | 171 | return 'original' === $rendition->getName(); |
| 172 | 172 | } |
| 173 | 173 | )->first(); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | private function retryDecider(): callable |
| 65 | 65 | { |
| 66 | - return function ( |
|
| 66 | + return function( |
|
| 67 | 67 | $retries, |
| 68 | 68 | Request $request, |
| 69 | 69 | Response $response = null, |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | private function retryDelay(): callable |
| 104 | 104 | { |
| 105 | - return static function ($numberOfRetries): int { |
|
| 105 | + return static function($numberOfRetries): int { |
|
| 106 | 106 | return 1000 * $numberOfRetries; |
| 107 | 107 | }; |
| 108 | 108 | } |