Passed
Push — v1 ( b69a20...90d4e1 )
by Andrew
20:08 queued 10:11
created
src/controllers/DefaultController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
 
85 85
                     // rawDuration is in 00:00:00.00 format. This converts it to seconds.
86 86
                     $ar = array_reverse(explode(':', $rawDuration));
87
-                    $duration = (float)$ar[0];
87
+                    $duration = (float) $ar[0];
88 88
                     if (!empty($ar[1])) {
89
-                        $duration += (int)$ar[1] * 60;
89
+                        $duration += (int) $ar[1] * 60;
90 90
                     }
91 91
                     if (!empty($ar[2])) {
92
-                        $duration += (int)$ar[2] * 60 * 60;
92
+                        $duration += (int) $ar[2] * 60 * 60;
93 93
                     }
94 94
                 } else {
95 95
                     $duration = 'unknown'; // with GIF as input, duration is unknown
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
 
107 107
                 //rawTime is in 00:00:00.00 format. This converts it to seconds.
108 108
                 $ar = array_reverse(explode(':', $rawTime));
109
-                $time = (float)$ar[0];
109
+                $time = (float) $ar[0];
110 110
                 if (!empty($ar[1])) {
111
-                    $time += (int)$ar[1] * 60;
111
+                    $time += (int) $ar[1] * 60;
112 112
                 }
113 113
                 if (!empty($ar[2])) {
114
-                    $time += (int)$ar[2] * 60 * 60;
114
+                    $time += (int) $ar[2] * 60 * 60;
115 115
                 }
116 116
 
117 117
                 //calculate the progress
Please login to merge, or discard this patch.
src/helpers/Manifest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         $cache = Craft::$app->getCache();
301 301
         $file = $cache->getOrSet(
302 302
             self::CACHE_KEY.$path,
303
-            function () use ($path) {
303
+            function() use ($path) {
304 304
                 $result = null;
305 305
                 $string = @file_get_contents($path);
306 306
                 if ($string) {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     protected static function combinePaths(string ...$paths): string
328 328
     {
329 329
         $last_key = \count($paths) - 1;
330
-        array_walk($paths, function (&$val, $key) use ($last_key) {
330
+        array_walk($paths, function(&$val, $key) use ($last_key) {
331 331
             switch ($key) {
332 332
                 case 0:
333 333
                     $val = rtrim($val, '/ ');
Please login to merge, or discard this patch.
src/Transcoder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         Event::on(
132 132
             CraftVariable::class,
133 133
             CraftVariable::EVENT_INIT,
134
-            function (Event $event) {
134
+            function(Event $event) {
135 135
                 /** @var CraftVariable $variable */
136 136
                 $variable = $event->sender;
137 137
                 $variable->set('transcoder', TranscoderVariable::class);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         Event::on(
150 150
             Assets::class,
151 151
             Assets::EVENT_GET_THUMB_PATH,
152
-            function (AssetThumbEvent $event) {
152
+            function(AssetThumbEvent $event) {
153 153
                 Craft::debug(
154 154
                     'Assets::EVENT_GET_THUMB_PATH',
155 155
                     __METHOD__
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             Event::on(
167 167
                 ClearCaches::class,
168 168
                 ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
169
-                function (RegisterCacheOptionsEvent $event) {
169
+                function(RegisterCacheOptionsEvent $event) {
170 170
                     $event->options[] = [
171 171
                         'key' => 'transcoder',
172 172
                         'label' => Craft::t('transcoder', 'Transcoder caches'),
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         Event::on(
180 180
             Plugins::class,
181 181
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
182
-            function (PluginEvent $event) {
182
+            function(PluginEvent $event) {
183 183
                 if ($event->plugin === $this) {
184 184
                     $request = Craft::$app->getRequest();
185 185
                     if ($request->isCpRequest) {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         Event::on(
205 205
             UrlManager::class,
206 206
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
207
-            function (RegisterUrlRulesEvent $event) {
207
+            function(RegisterUrlRulesEvent $event) {
208 208
                 Craft::debug(
209 209
                     'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
210 210
                     __METHOD__
Please login to merge, or discard this patch.
src/services/Transcode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -480,7 +480,7 @@
 block discarded – undo
480 480
                     && (strpos($summaryResult['videoFrameRate'], '/') !== false)
481 481
                 ) {
482 482
                     $parts = explode('/', $summaryResult['videoFrameRate']);
483
-                    $summaryResult['videoFrameRate'] = (float)$parts[0] / (float)$parts[1];
483
+                    $summaryResult['videoFrameRate'] = (float) $parts[0] / (float) $parts[1];
484 484
                 }
485 485
                 $result = $summaryResult;
486 486
             }
Please login to merge, or discard this patch.