Commit 0059b272 authored by Harsh Panchal's avatar Harsh Panchal Committed by abdulaziz zaid 🇸🇦
Browse files

Issue #3294526 by Harsh panchal: Phpcs Drupal coding standard issue

parent 3b0bd46a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ the video URLs that you will use with the Video Embed Field.
REQUIREMENTS
------------

Installed Video Embed Field. And a field created with the type of video_embed_field.
Installed Video Embed Field. And a field created with the type of
video_embed_field.


INSTALLATION
+3 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class CloudflareStream extends ProviderPluginBase {
   */
  public static function getIdFromInput($input) {
    preg_match('/^https?:\/\/(watch|iframe).videodelivery.net\/(?<id>[0-9a-zA-Z-_]{2,32}).*?(\?startTime=(\d+))?$/', $input, $matches);
    return isset($matches['id']) ? $matches['id'] : FALSE;
    return $matches['id'] ?? FALSE;
  }

  /**
@@ -64,9 +64,10 @@ class CloudflareStream extends ProviderPluginBase {
   * {@inheritdoc}
   */
  public function getRemoteThumbnailUrl() {
    // @TODO: Implement generating animated thumbnails.
    // @todo Implement generating animated thumbnails.
    // https://videodelivery.net/%s/thumbnails/thumbnail.gif?time=3s&height=200&duration=4s
    $url = 'https://videodelivery.net/%s/thumbnails/thumbnail.jpg';
    return sprintf($url, $this->getVideoId());
  }

}