Passed
Push — master ( 12bba4...f7937a )
by Shahrad
01:31
created
src/lib/Model/DownloadResult.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,9 @@
 block discarded – undo
132 132
     public function save(string $filePath): bool
133 133
     {
134 134
         $pathInfo = pathinfo($filePath, PATHINFO_DIRNAME);
135
-        if (gettype($pathInfo) != "string") $pathInfo = $pathInfo['dirname'];
135
+        if (gettype($pathInfo) != "string") {
136
+            $pathInfo = $pathInfo['dirname'];
137
+        }
136 138
         if (!file_exists($pathInfo)) {
137 139
             throw new \InvalidArgumentException('The directory does not exist');
138 140
         }
Please login to merge, or discard this patch.
src/lib/Util/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      */
88 88
     public static function insensitiveString(string $string, string $value): bool
89 89
     {
90
-        return (bool)preg_match_all('/' . $value . '/i', $string);
90
+        return (bool) preg_match_all('/' . $value . '/i', $string);
91 91
     }
92 92
 
93 93
 }
94 94
\ No newline at end of file
Please login to merge, or discard this patch.
src/lib/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     public function setHasSelfSignedCertificate(bool $has): void
62 62
     {
63
-        putenv('HAS_SELF_SIGNED_CERT='.($has ? 'true' : 'false'));
63
+        putenv('HAS_SELF_SIGNED_CERT=' . ($has ? 'true' : 'false'));
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.
src/lib/Middleware.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
         curl_setopt($cHandler, CURLOPT_TIMEOUT, $options->getTimeout());
102 102
 
103 103
         # If self-signed certs are allowed, set it.
104
-        if ((bool)getenv('HAS_SELF_SIGNED_CERT') === true) {
104
+        if ((bool) getenv('HAS_SELF_SIGNED_CERT') === true) {
105 105
             curl_setopt($cHandler, CURLOPT_SSL_VERIFYPEER, false);
106 106
             curl_setopt($cHandler, CURLOPT_SSL_VERIFYHOST, false);
107 107
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,9 @@
 block discarded – undo
129 129
 
130 130
             $headers = [];
131 131
             foreach ($options->getHeader() as $header => $value) {
132
-                if (Utils::insensitiveString($header, 'content-type')) continue;
132
+                if (Utils::insensitiveString($header, 'content-type')) {
133
+                    continue;
134
+                }
133 135
                 $headers[] = $header . ': ' . $value;
134 136
             }
135 137
             $headers[] = 'Content-Type: multipart/form-data';
Please login to merge, or discard this patch.