| @@ -20,7 +20,7 @@ | ||
| 20 | 20 | * @param string $uri | 
| 21 | 21 | * @param array $options | 
| 22 | 22 | * | 
| 23 | - * @return \GuzzleHttp\Message\ResponseInterface | |
| 23 | + * @return \Psr\Http\Message\ResponseInterface | |
| 24 | 24 | */ | 
| 25 | 25 | protected function _doRequest($method, $uri, $options) | 
| 26 | 26 |      { | 
| @@ -3,11 +3,11 @@ | ||
| 3 | 3 | namespace MovingImage\Client\VMPro\ApiClient; | 
| 4 | 4 | |
| 5 | 5 | use GuzzleHttp\Message\Response; | 
| 6 | -use MovingImage\Client\VMPro\ApiClient; | |
| 7 | -use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; | |
| 8 | 6 | use GuzzleHttp\Message\ResponseInterface; | 
| 9 | -use MovingImage\Client\VMPro\Exception; | |
| 10 | 7 | use GuzzleHttp\Stream\Stream; | 
| 8 | +use MovingImage\Client\VMPro\ApiClient; | |
| 9 | +use MovingImage\Client\VMPro\Exception; | |
| 10 | +use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; | |
| 11 | 11 | |
| 12 | 12 | /** | 
| 13 | 13 | * Class Guzzle5ApiClient. | 
| @@ -2,8 +2,8 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace MovingImage\Client\VMPro\Entity; | 
| 4 | 4 | |
| 5 | -use JMS\Serializer\Annotation\Type; | |
| 6 | 5 | use JMS\Serializer\Annotation\SerializedName; | 
| 6 | +use JMS\Serializer\Annotation\Type; | |
| 7 | 7 | use MovingImage\Meta\Interfaces\VideoInterface; | 
| 8 | 8 | |
| 9 | 9 | /** | 
| @@ -398,7 +398,7 @@ | ||
| 398 | 398 | public function getStills() | 
| 399 | 399 |      { | 
| 400 | 400 | //sorting preview's images from smallest to biggest | 
| 401 | -        usort($this->stills, function (array $item1, array $item2) { | |
| 401 | +        usort($this->stills, function(array $item1, array $item2) { | |
| 402 | 402 |              if (isset($item1['dimension']['height'], $item2['dimension']['height']) && $item1['dimension']['height'] != $item2['dimension']['height']) { | 
| 403 | 403 | return ($item1['dimension']['height'] > $item2['dimension']['height']) ? 1 : -1; | 
| 404 | 404 | } | 
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | */ | 
| 47 | 47 | public function __invoke(callable $handler) | 
| 48 | 48 |      { | 
| 49 | - return function ( | |
| 49 | + return function( | |
| 50 | 50 | RequestInterface $request, | 
| 51 | 51 | array $options | 
| 52 | 52 |          ) use ($handler) { | 
| @@ -45,12 +45,12 @@ | ||
| 45 | 45 | */ | 
| 46 | 46 | protected function sortChannels(ArrayCollection $channels) | 
| 47 | 47 |      { | 
| 48 | -        $channels->map(function ($channel) { | |
| 48 | +        $channels->map(function($channel) { | |
| 49 | 49 | $channel->setChildren($this->sortChannels($channel->getChildren())); | 
| 50 | 50 | }); | 
| 51 | 51 | |
| 52 | 52 | $iterator = $channels->getIterator(); | 
| 53 | -        $iterator->uasort(function ($a, $b) { | |
| 53 | +        $iterator->uasort(function($a, $b) { | |
| 54 | 54 | return $a->getName() > $b->getName(); | 
| 55 | 55 | }); | 
| 56 | 56 | |
| @@ -5,12 +5,12 @@ | ||
| 5 | 5 | use Doctrine\Common\Collections\ArrayCollection; | 
| 6 | 6 | use MovingImage\Client\VMPro\Collection\ChannelCollection; | 
| 7 | 7 | use MovingImage\Client\VMPro\Collection\VideoCollection; | 
| 8 | +use MovingImage\Client\VMPro\Entity\Attachment; | |
| 8 | 9 | use MovingImage\Client\VMPro\Entity\Channel; | 
| 9 | 10 | use MovingImage\Client\VMPro\Entity\ChannelsRequestParameters; | 
| 10 | 11 | use MovingImage\Client\VMPro\Entity\EmbedCode; | 
| 11 | 12 | use MovingImage\Client\VMPro\Entity\Keyword; | 
| 12 | 13 | use MovingImage\Client\VMPro\Entity\Video; | 
| 13 | -use MovingImage\Client\VMPro\Entity\Attachment; | |
| 14 | 14 | use MovingImage\Client\VMPro\Entity\VideoManager; | 
| 15 | 15 | use MovingImage\Client\VMPro\Entity\VideoRequestParameters; | 
| 16 | 16 | use MovingImage\Client\VMPro\Entity\VideosRequestParameters; | 
| @@ -201,7 +201,7 @@ discard block | ||
| 201 | 201 | * @param string $method | 
| 202 | 202 | * @param string $uri | 
| 203 | 203 | * @param array $options | 
| 204 | - * @param mixed $response | |
| 204 | + * @param ResponseInterface $response | |
| 205 | 205 | * | 
| 206 | 206 | * @return bool | 
| 207 | 207 | */ | 
| @@ -217,7 +217,7 @@ discard block | ||
| 217 | 217 | * Serializes the provided response to a string, suitable for caching. | 
| 218 | 218 | * The type of the $response argument varies depending on the guzzle version. | 
| 219 | 219 | * | 
| 220 | - * @param mixed $response | |
| 220 | + * @param ResponseInterface $response | |
| 221 | 221 | * | 
| 222 | 222 | * @return string | 
| 223 | 223 | */ | 
| @@ -2,10 +2,10 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace MovingImage\Client\VMPro\Entity; | 
| 4 | 4 | |
| 5 | -use JMS\Serializer\Annotation\Type; | |
| 6 | 5 | use JMS\Serializer\Annotation\HandlerCallback; | 
| 7 | -use JMS\Serializer\JsonDeserializationVisitor; | |
| 6 | +use JMS\Serializer\Annotation\Type; | |
| 8 | 7 | use JMS\Serializer\DeserializationContext; | 
| 8 | +use JMS\Serializer\JsonDeserializationVisitor; | |
| 9 | 9 | use MovingImage\Meta\Interfaces\AttachmentInterface; | 
| 10 | 10 | |
| 11 | 11 | /** | 
| @@ -3,8 +3,8 @@ | ||
| 3 | 3 | namespace MovingImage\Client\VMPro\Entity; | 
| 4 | 4 | |
| 5 | 5 | use Doctrine\Common\Collections\ArrayCollection; | 
| 6 | -use JMS\Serializer\Annotation\Type; | |
| 7 | 6 | use JMS\Serializer\Annotation\SerializedName; | 
| 7 | +use JMS\Serializer\Annotation\Type; | |
| 8 | 8 | use MovingImage\Meta\Interfaces\ChannelInterface; | 
| 9 | 9 | |
| 10 | 10 | /** |