Passed
Pull Request — master (#44)
by
unknown
03:31
created
src/File.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@
 block discarded – undo
42 42
         if (is_dir($dir)) {
43 43
             $size = 0;
44 44
             foreach (scandir($dir) as $file) {
45
-                if (in_array($file, [".", ".."])) continue;
45
+                if (in_array($file, [".", ".."])) {
46
+                    continue;
47
+                }
46 48
                 $filename = $dir . DIRECTORY_SEPARATOR . $file;
47 49
                 $size += is_file($filename) ? filesize($filename) : static::directorySize($filename);
48 50
             }
Please login to merge, or discard this patch.
src/AutoReps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
      */
173 173
     private function sortReps(array &$reps): void
174 174
     {
175
-        usort($reps, function (Representation $rep1, Representation $rep2) {
175
+        usort($reps, function(Representation $rep1, Representation $rep2) {
176 176
             $ascending = $rep1->getKiloBitrate() > $rep2->getKiloBitrate();
177 177
             return $this->sort === "asc" ? $ascending : !$ascending;
178 178
         });
Please login to merge, or discard this patch.
src/HLSKeyInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
      */
177 177
     private function call(): callable
178 178
     {
179
-        return function ($log) {
179
+        return function($log) {
180 180
             if (false !== strpos($log, $this->search_for) && !in_array($log, $this->segments)) {
181 181
                 array_push($this->segments, $log);
182 182
                 if ($this->key_rotation_period === 1 || (count($this->segments) % $this->key_rotation_period) === 0) {
Please login to merge, or discard this patch.
src/Utiles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public static function concatKeyValue(array &$array, string $glue = ""): void
32 32
     {
33
-        array_walk($array, function (&$value, $key) use ($glue) {
33
+        array_walk($array, function(&$value, $key) use ($glue) {
34 34
             $value = "$key$glue$value";
35 35
         });
36 36
     }
Please login to merge, or discard this patch.
src/Clouds/MicrosoftAzure.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function __construct($connection, array $options = [])
31 31
     {
32
-        if(!class_exists('\MicrosoftAzure\Storage\Blob\BlobRestProxy')){
32
+        if (!class_exists('\MicrosoftAzure\Storage\Blob\BlobRestProxy')) {
33 33
             throw new RuntimeException('MicrosoftAzure\Storage\Blob\BlobRestProxy not found. make sure the package is installed: composer require microsoft/azure-storage-blob');
34 34
         }
35 35
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function uploadDirectory(string $dir, array $options): void
45 45
     {
46
-        if(!isset($options['container'])){
46
+        if (!isset($options['container'])) {
47 47
             throw new InvalidArgumentException("You should set the container in the array");
48 48
         }
49 49
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function download(string $save_to, array $options): void
69 69
     {
70
-        if(!isset($options['container']) ||  !isset($options['blob'])){
70
+        if (!isset($options['container']) || !isset($options['blob'])) {
71 71
             throw new InvalidArgumentException("You should set the container and blob in the array");
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/Clouds/S3.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function __construct(array $config)
30 30
     {
31
-        if(!class_exists('\Aws\S3\S3Client')){
31
+        if (!class_exists('\Aws\S3\S3Client')) {
32 32
             throw new RuntimeException('Aws\S3\S3Client not found. make sure the package is installed: composer require aws/aws-sdk-php');
33 33
         }
34 34
 
35
-        $this->s3 = new \Aws\S3\S3Client($config);;
35
+        $this->s3 = new \Aws\S3\S3Client($config); ;
36 36
     }
37 37
 
38 38
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function uploadDirectory(string $dir, array $options): void
43 43
     {
44
-        if(!isset($options['dest'])){
44
+        if (!isset($options['dest'])) {
45 45
             throw new InvalidArgumentException("You should set the dest in the array");
46 46
         }
47 47
         $dest = $options['dest'];
Please login to merge, or discard this patch.
src/Clouds/GoogleCloudStorage.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct(array $config)
25 25
     {
26
-        if(!class_exists('\Google\Cloud\Storage\StorageClient')){
26
+        if (!class_exists('\Google\Cloud\Storage\StorageClient')) {
27 27
             throw new RuntimeException('Google\Cloud\Storage\StorageClient not found. make sure the package is installed: composer require google/cloud-storage');
28 28
         }
29 29
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $bucket = $this->getBucket($options);
66 66
 
67
-        if(!isset($options['bucket'])){
67
+        if (!isset($options['bucket'])) {
68 68
             throw new InvalidArgumentException("You need to set the bucket name in the option array");
69 69
         }
70 70
         $name = $options['object_name'];
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
      */
84 84
     private function getBucket(array $options): \Google\Cloud\Storage\Bucket
85 85
     {
86
-        if(!isset($options['bucket'])){
86
+        if (!isset($options['bucket'])) {
87 87
             throw new InvalidArgumentException("You need to set the bucket name in the option array");
88 88
         }
89
-        try{
89
+        try {
90 90
             return $this->storage->bucket($options['bucket'], $options['user_project'] ?? false);
91
-        }catch (\Exception $e){
91
+        } catch (\Exception $e) {
92 92
             throw new RuntimeException(sprintf("An error occurred while opening the bucket: %s", $e->getMessage()), $e->getCode(), $e);
93 93
         }
94 94
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         }
89 89
         try{
90 90
             return $this->storage->bucket($options['bucket'], $options['user_project'] ?? false);
91
-        }catch (\Exception $e){
91
+        } catch (\Exception $e){
92 92
             throw new RuntimeException(sprintf("An error occurred while opening the bucket: %s", $e->getMessage()), $e->getCode(), $e);
93 93
         }
94 94
     }
Please login to merge, or discard this patch.