Completed
Pull Request — master (#8)
by Ricardo
02:47
created
src/Adapter/VideoAdapterInterface.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -24,6 +24,9 @@
 block discarded – undo
24 24
 
25 25
     public function getEmbedUrl(bool $forceAutoplay = false, bool $forceSecure = false): string;
26 26
 
27
+    /**
28
+     * @return string
29
+     */
27 30
     public function getEmbedCode(int $width, int $height, bool $forceAutoplay = false, bool $forceSecure = false);
28 31
 
29 32
     public function isEmbeddable(): bool;
Please login to merge, or discard this patch.
src/Container/ServicesContainer.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -73,6 +73,9 @@
 block discarded – undo
73 73
         return $this->services;
74 74
     }
75 75
 
76
+    /**
77
+     * @param string $serviceName
78
+     */
76 79
     public function hasService($serviceName): bool
77 80
     {
78 81
         return in_array($serviceName, $this->services);
Please login to merge, or discard this patch.
src/Adapter/Youtube/YoutubeServiceAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             throw new InvalidThumbnailSizeException();
48 48
         }
49 49
 
50
-        return $this->getScheme($forceSecure) . '://img.youtube.com/vi/' . $this->getVideoId() . '/' . $size . '.jpg';
50
+        return $this->getScheme($forceSecure).'://img.youtube.com/vi/'.$this->getVideoId().'/'.$size.'.jpg';
51 51
     }
52 52
 
53 53
     public function getThumbNailSizes(): array
Please login to merge, or discard this patch.
src/Adapter/Facebook/FacebookServiceAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             throw new InvalidThumbnailSizeException();
42 42
         }
43 43
 
44
-        return $this->getScheme($forceSecure) . '://graph.facebook.com/' . $this->getVideoId() . '/picture';
44
+        return $this->getScheme($forceSecure).'://graph.facebook.com/'.$this->getVideoId().'/picture';
45 45
     }
46 46
 
47 47
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function getEmbedUrl(bool $forceAutoplay = false, bool $forceSecure = false): string
80 80
     {
81
-        return $this->getScheme($forceSecure) . '://www.facebook.com/video/embed?video_id=' . $this->getVideoId();
81
+        return $this->getScheme($forceSecure).'://www.facebook.com/video/embed?video_id='.$this->getVideoId();
82 82
     }
83 83
 
84 84
     public function isEmbeddable(): bool
Please login to merge, or discard this patch.
src/Adapter/Vimeo/VimeoServiceAdapter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function getEmbedUrl(bool $forceAutoplay = false, bool $forceSecure = false): string
101 101
     {
102
-        return $this->getScheme($forceSecure) . '://player.vimeo.com/video/' . $this->getVideoId() . ($forceAutoplay ? '?autoplay=1' : '');
102
+        return $this->getScheme($forceSecure).'://player.vimeo.com/video/'.$this->getVideoId().($forceAutoplay ? '?autoplay=1' : '');
103 103
     }
104 104
 
105 105
     public function getThumbNailSizes(): array
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function getSmallThumbnail(bool $forceSecure = false): string
119 119
     {
120
-        return $this->getThumbnail(self::THUMBNAIL_SMALL,$forceSecure);
120
+        return $this->getThumbnail(self::THUMBNAIL_SMALL, $forceSecure);
121 121
     }
122 122
 
123 123
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function getMediumThumbnail(bool $forceSecure = false): string
128 128
     {
129
-        return $this->getThumbnail(self::THUMBNAIL_MEDIUM,$forceSecure);
129
+        return $this->getThumbnail(self::THUMBNAIL_MEDIUM, $forceSecure);
130 130
     }
131 131
 
132 132
     /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function getLargeThumbnail(bool $forceSecure = false): string
137 137
     {
138
-        return $this->getThumbnail(self::THUMBNAIL_LARGE,$forceSecure);
138
+        return $this->getThumbnail(self::THUMBNAIL_LARGE, $forceSecure);
139 139
     }
140 140
 
141 141
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getLargestThumbnail(bool $forceSecure = false): string
146 146
     {
147
-        return $this->getThumbnail(self::THUMBNAIL_LARGE,$forceSecure);
147
+        return $this->getThumbnail(self::THUMBNAIL_LARGE, $forceSecure);
148 148
     }
149 149
 
150 150
     public function isEmbeddable(): bool
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     private function getVideoDataFromServiceApi(): array
169 169
     {
170
-        $contents = file_get_contents('http://vimeo.com/api/v2/video/' . $this->getVideoId() . '.php');
170
+        $contents = file_get_contents('http://vimeo.com/api/v2/video/'.$this->getVideoId().'.php');
171 171
         if (false === $contents) {
172 172
             throw new ServiceApiNotAvailable(
173 173
                 'Service "%s" could not reach it\'s API. Check if file_get_contents() function is available.',
Please login to merge, or discard this patch.
src/Adapter/Dailymotion/DailymotionServiceAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             throw new InvalidThumbnailSizeException();
46 46
         }
47 47
 
48
-        return $this->getScheme($forceSecure) . '://www.dailymotion.com/' . $size . '/video/' . $this->videoId;
48
+        return $this->getScheme($forceSecure).'://www.dailymotion.com/'.$size.'/video/'.$this->videoId;
49 49
     }
50 50
 
51 51
     /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function getEmbedUrl(bool $forceAutoplay = false, bool $forceSecure = false): string
95 95
     {
96
-        return $this->getScheme($forceSecure) . '://www.dailymotion.com/embed/video/' . $this->videoId . ($forceAutoplay ? '?amp&autoplay=1' : '');
96
+        return $this->getScheme($forceSecure).'://www.dailymotion.com/embed/video/'.$this->videoId.($forceAutoplay ? '?amp&autoplay=1' : '');
97 97
     }
98 98
 
99 99
     public function isEmbeddable(): bool
Please login to merge, or discard this patch.