@@ -61,7 +61,7 @@ |
||
| 61 | 61 | |
| 62 | 62 | $serializerBuilder = SerializerBuilder::create(); |
| 63 | 63 | |
| 64 | - $serializerBuilder->configureHandlers(static function (HandlerRegistry $registry) { |
|
| 64 | + $serializerBuilder->configureHandlers(static function(HandlerRegistry $registry) { |
|
| 65 | 65 | $registry->registerSubscribingHandler(new DeserializeAttachmentSubscriber()); |
| 66 | 66 | }); |
| 67 | 67 | |
@@ -241,6 +241,9 @@ |
||
| 241 | 241 | return $this->deserialize($response->getBody()->getContents(), 'array<'.Attachment::class.'>'); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | + /** |
|
| 245 | + * @param string $videoId |
|
| 246 | + */ |
|
| 244 | 247 | public function getKeywords(int $videoManagerId, ?string $videoId): array |
| 245 | 248 | { |
| 246 | 249 | $uri = is_null($videoId) |
@@ -53,11 +53,11 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | protected function sortChannels(array $channels) |
| 55 | 55 | { |
| 56 | - array_map(function ($channel) { |
|
| 56 | + array_map(function($channel) { |
|
| 57 | 57 | $channel->setChildren($this->sortChannels($channel->getChildren())); |
| 58 | 58 | }, $channels); |
| 59 | 59 | |
| 60 | - uasort($channels, function ($a, $b) { |
|
| 60 | + uasort($channels, function($a, $b) { |
|
| 61 | 61 | return $a->getName() > $b->getName(); |
| 62 | 62 | }); |
| 63 | 63 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | /** |
| 138 | 138 | * Deserialize a response into an instance of it's associated class. |
| 139 | 139 | * |
| 140 | - * @return object |
|
| 140 | + * @return \MovingImage\Meta\Interfaces\ChannelInterface[] |
|
| 141 | 141 | */ |
| 142 | 142 | protected function deserialize(string $data, string $serialisationClass) |
| 143 | 143 | { |
@@ -191,6 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | /** |
| 193 | 193 | * Checks if the request may be cached. |
| 194 | + * @param ResponseInterface $response |
|
| 194 | 195 | */ |
| 195 | 196 | private function isCacheable(string $method, string $uri, array $options, $response): bool |
| 196 | 197 | { |
@@ -220,7 +221,7 @@ discard block |
||
| 220 | 221 | * Serializes the provided response to a string, suitable for caching. |
| 221 | 222 | * The type of the $response argument varies depending on the guzzle version. |
| 222 | 223 | * |
| 223 | - * @param mixed $response |
|
| 224 | + * @param ResponseInterface $response |
|
| 224 | 225 | * |
| 225 | 226 | * @return string |
| 226 | 227 | */ |
@@ -138,6 +138,9 @@ |
||
| 138 | 138 | return $this->parentId; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | + /** |
|
| 142 | + * @param integer $parentId |
|
| 143 | + */ |
|
| 141 | 144 | public function setParentId(?int $parentId): self |
| 142 | 145 | { |
| 143 | 146 | $this->parentId = $parentId; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function __invoke(callable $handler): Closure |
| 37 | 37 | { |
| 38 | - return function ( |
|
| 38 | + return function( |
|
| 39 | 39 | RequestInterface $request, |
| 40 | 40 | array $options |
| 41 | 41 | ) use ($handler) { |
@@ -298,7 +298,7 @@ |
||
| 298 | 298 | public function getStills(): array |
| 299 | 299 | { |
| 300 | 300 | //sorting preview's images from smallest to biggest |
| 301 | - usort($this->stills, function (array $item1, array $item2) { |
|
| 301 | + usort($this->stills, function(array $item1, array $item2) { |
|
| 302 | 302 | if (isset($item1['dimension']['height'], $item2['dimension']['height']) && $item1['dimension']['height'] != $item2['dimension']['height']) { |
| 303 | 303 | return ($item1['dimension']['height'] > $item2['dimension']['height']) ? 1 : -1; |
| 304 | 304 | } |