@@ -73,7 +73,7 @@ |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * @return array |
|
| 76 | + * @return string[] |
|
| 77 | 77 | */ |
| 78 | 78 | public function getThumbNailSizes() |
| 79 | 79 | { |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | throw new InvalidThumbnailSizeException(); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - return $this->getScheme($forceSecure) . '://img.youtube.com/vi/' . $this->getVideoId() . '/' . $size . '.jpg'; |
|
| 74 | + return $this->getScheme($forceSecure).'://img.youtube.com/vi/'.$this->getVideoId().'/'.$size.'.jpg'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | /** |
| 54 | 54 | * Returns all thumbnails available sizes. |
| 55 | 55 | * |
| 56 | - * @return array |
|
| 56 | + * @return string[] |
|
| 57 | 57 | */ |
| 58 | 58 | public function getThumbNailSizes() |
| 59 | 59 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | throw new InvalidThumbnailSizeException(); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return $this->getScheme($forceSecure) . '://www.dailymotion.com/' . $size . '/video/' . $this->videoId; |
|
| 78 | + return $this->getScheme($forceSecure).'://www.dailymotion.com/'.$size.'/video/'.$this->videoId; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public function getEmbedUrl($forceAutoplay = false, $forceSecure = false) |
| 138 | 138 | { |
| 139 | - return $this->getScheme($forceSecure) . '://www.dailymotion.com/embed/video/' . $this->videoId . ($forceAutoplay ? '?amp&autoplay=1' : ''); |
|
| 139 | + return $this->getScheme($forceSecure).'://www.dailymotion.com/embed/video/'.$this->videoId.($forceAutoplay ? '?amp&autoplay=1' : ''); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | throw new InvalidThumbnailSizeException(); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return $this->getScheme($forceSecure) . '://graph.facebook.com/' . $this->getVideoId() . '/picture'; |
|
| 78 | + return $this->getScheme($forceSecure).'://graph.facebook.com/'.$this->getVideoId().'/picture'; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function getEmbedUrl($forceAutoplay = false, $forceSecure = false) |
| 136 | 136 | { |
| 137 | - return $this->getScheme($forceSecure) . '://www.facebook.com/video/embed?video_id=' . $this->getVideoId(); |
|
| 137 | + return $this->getScheme($forceSecure).'://www.facebook.com/video/embed?video_id='.$this->getVideoId(); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | /** |
| 54 | 54 | * Returns all thumbnails available sizes. |
| 55 | 55 | * |
| 56 | - * @return array |
|
| 56 | + * @return string[] |
|
| 57 | 57 | */ |
| 58 | 58 | public function getThumbNailSizes() |
| 59 | 59 | { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | /** |
| 153 | 153 | * Returns all thumbnails available sizes. |
| 154 | 154 | * |
| 155 | - * @return array |
|
| 155 | + * @return string[] |
|
| 156 | 156 | */ |
| 157 | 157 | public function getThumbNailSizes() |
| 158 | 158 | { |
@@ -228,6 +228,7 @@ discard block |
||
| 228 | 228 | * |
| 229 | 229 | * @todo make this better by using guzzle |
| 230 | 230 | * |
| 231 | + * @param string $url |
|
| 231 | 232 | * @return array |
| 232 | 233 | * |
| 233 | 234 | * @throws ServiceApiNotAvailable |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function getEmbedUrl($forceAutoplay = false, $forceSecure = false) |
| 148 | 148 | { |
| 149 | - return $this->getScheme($forceSecure) . '://player.vimeo.com/video/' . $this->getVideoId() . ($forceAutoplay ? '?autoplay=1' : ''); |
|
| 149 | + return $this->getScheme($forceSecure).'://player.vimeo.com/video/'.$this->getVideoId().($forceAutoplay ? '?autoplay=1' : ''); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function getSmallThumbnail($forceSecure = false) |
| 175 | 175 | { |
| 176 | - return $this->getThumbnail(self::THUMBNAIL_SMALL,$forceSecure); |
|
| 176 | + return $this->getThumbnail(self::THUMBNAIL_SMALL, $forceSecure); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | public function getMediumThumbnail($forceSecure = false) |
| 188 | 188 | { |
| 189 | - return $this->getThumbnail(self::THUMBNAIL_MEDIUM,$forceSecure); |
|
| 189 | + return $this->getThumbnail(self::THUMBNAIL_MEDIUM, $forceSecure); |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | /** |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | public function getLargeThumbnail($forceSecure = false) |
| 201 | 201 | { |
| 202 | - return $this->getThumbnail(self::THUMBNAIL_LARGE,$forceSecure); |
|
| 202 | + return $this->getThumbnail(self::THUMBNAIL_LARGE, $forceSecure); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function getLargestThumbnail($forceSecure = false) |
| 214 | 214 | { |
| 215 | - return $this->getThumbnail(self::THUMBNAIL_LARGE,$forceSecure); |
|
| 215 | + return $this->getThumbnail(self::THUMBNAIL_LARGE, $forceSecure); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | private function getVideoDataFromServiceApi($url) |
| 236 | 236 | { |
| 237 | - $contents = file_get_contents('https://vimeo.com/api/oembed.json?url=' . urlencode($url)); |
|
| 237 | + $contents = file_get_contents('https://vimeo.com/api/oembed.json?url='.urlencode($url)); |
|
| 238 | 238 | if (false === $contents) { |
| 239 | 239 | throw new ServiceApiNotAvailable( |
| 240 | 240 | 'Service "%s" could not reach it\'s API. Check if file_get_contents() function is available.', |