Passed
Push — v1 ( 9b2918...ee0a5e )
by Andrew
11:36 queued 04:46
created
src/variables/TranscoderVariable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
     {
156 156
         $result = '';
157 157
         $filePath = parse_url($url, PHP_URL_PATH);
158
-        $filePath = $_SERVER['DOCUMENT_ROOT'] . $filePath;
158
+        $filePath = $_SERVER['DOCUMENT_ROOT'].$filePath;
159 159
         if (file_exists($filePath)) {
160 160
             $urlParams = [
161 161
                 'url' => $url,
Please login to merge, or discard this patch.
src/controllers/DefaultController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $filePath = parse_url($url, PHP_URL_PATH);
68 68
         // Remove any relative paths
69 69
         if (!PathHelper::ensurePathIsContained($filePath)) {
70
-            throw new BadRequestHttpException('Invalid resource path: ' . $filePath);
70
+            throw new BadRequestHttpException('Invalid resource path: '.$filePath);
71 71
         }
72 72
         // Only work for `allowedFileExtensions` file extensions
73 73
         $extension = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             throw new AssetDisallowedExtensionException("File “{$filePath}” cannot be downloaded because “{$extension}” is not allowed.");
77 77
         }
78 78
 
79
-        $filePath = $_SERVER['DOCUMENT_ROOT'] . $filePath;
79
+        $filePath = $_SERVER['DOCUMENT_ROOT'].$filePath;
80 80
         Craft::$app->getResponse()->sendFile(
81 81
             $filePath,
82 82
             null,
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function actionProgress($filename)
101 101
     {
102 102
         $result = [];
103
-        $progressFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $filename . '.progress';
103
+        $progressFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.$filename.'.progress';
104 104
         if (file_exists($progressFile)) {
105 105
             $content = @file_get_contents($progressFile);
106 106
             if ($content) {
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 
112 112
                     // rawDuration is in 00:00:00.00 format. This converts it to seconds.
113 113
                     $ar = array_reverse(explode(':', $rawDuration));
114
-                    $duration = (float)$ar[0];
114
+                    $duration = (float) $ar[0];
115 115
                     if (!empty($ar[1])) {
116
-                        $duration += (int)$ar[1] * 60;
116
+                        $duration += (int) $ar[1] * 60;
117 117
                     }
118 118
                     if (!empty($ar[2])) {
119
-                        $duration += (int)$ar[2] * 60 * 60;
119
+                        $duration += (int) $ar[2] * 60 * 60;
120 120
                     }
121 121
                 } else {
122 122
                     $duration = 'unknown'; // with GIF as input, duration is unknown
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
 
134 134
                 //rawTime is in 00:00:00.00 format. This converts it to seconds.
135 135
                 $ar = array_reverse(explode(':', $rawTime));
136
-                $time = (float)$ar[0];
136
+                $time = (float) $ar[0];
137 137
                 if (!empty($ar[1])) {
138
-                    $time += (int)$ar[1] * 60;
138
+                    $time += (int) $ar[1] * 60;
139 139
                 }
140 140
                 if (!empty($ar[2])) {
141
-                    $time += (int)$ar[2] * 60 * 60;
141
+                    $time += (int) $ar[2] * 60 * 60;
142 142
                 }
143 143
 
144 144
                 //calculate the progress
Please login to merge, or discard this patch.