]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5741 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Feb 2023 16:23:09 +0000 (17:23 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Feb 2023 16:23:09 +0000 (17:23 +0100)
app/Fluidbook/Links.php

index 6d2d522591222dc4a107f780281353f00e4fd7f7..4b6a8725492c4924de7b6e9201096d1419aca06c 100644 (file)
@@ -23,7 +23,7 @@ class Links
     protected static $_testLinkCache = null;
     protected static $_linksKey = null;
 
-    protected static $_webvideoServicesMap=[0=>'youtube',1=>'dailymotion',2=>'vimeo',3=>'brightcove'];
+    protected static $_webvideoServicesMap = [0 => 'youtube', 1 => 'dailymotion', 2 => 'vimeo', 3 => 'brightcove'];
 
     /**
      * @throws Exception
@@ -196,7 +196,8 @@ class Links
         return Str::lower(Str::random(12));
     }
 
-    protected static function _fixLinks(&$links){
+    protected static function _fixLinks(&$links)
+    {
         self::_correctImageSpecialLinks($links);
         self::_fixWebVideoServices($links);
     }
@@ -221,9 +222,9 @@ class Links
     protected static function _fixWebVideoServices(&$links)
     {
         foreach ($links as $k => $link) {
-            if($link['type']==10){
-                if(is_numeric($link['video_service'])){
-                    $links[$k]['video_service']=self::$_webvideoServicesMap[$link['video_service']];
+            if ($link['type'] == 10) {
+                if (is_numeric($link['video_service'])) {
+                    $links[$k]['video_service'] = self::$_webvideoServicesMap[$link['video_service']];
                 }
             }
         }