Passed
Push — master ( d45e5d...188227 )
by Darko
10:26
created
app/Http/Controllers/GetNzbController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         // Authenticate and authorize user
41 41
         $userData = $this->authenticateUser($request);
42
-        if (! \is_array($userData)) {
42
+        if (!\is_array($userData)) {
43 43
             return $userData; // Return error response
44 44
         }
45 45
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         // Validate and sanitize ID parameter
55 55
         $releaseId = $this->validateAndSanitizeId($request);
56
-        if (! \is_string($releaseId)) {
56
+        if (!\is_string($releaseId)) {
57 57
             return $releaseId; // Return error response
58 58
         }
59 59
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function normalizeGuidParameter(Request $request, ?string $guid): void
73 73
     {
74
-        if ($guid !== null && ! $request->has('id')) {
74
+        if ($guid !== null && !$request->has('id')) {
75 75
             $request->merge(['id' => $guid]);
76 76
         }
77 77
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         }
124 124
 
125 125
         $user = User::getByRssToken($request->input('r'));
126
-        if (! $user) {
126
+        if (!$user) {
127 127
             return Utility::showApiError(100);
128 128
         }
129 129
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     ) {
254 254
         // Get NZB file path and validate
255 255
         $nzbPath = (new NZB)->getNZBPath($releaseId);
256
-        if (! File::exists($nzbPath)) {
256
+        if (!File::exists($nzbPath)) {
257 257
             return Utility::showApiError(300, 'NZB file not found!');
258 258
         }
259 259
 
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
         ];
311 311
 
312 312
         // Add optional metadata headers
313
-        if (! empty($releaseData['imdbid']) && $releaseData['imdbid'] > 0) {
313
+        if (!empty($releaseData['imdbid']) && $releaseData['imdbid'] > 0) {
314 314
             $headers['X-DNZB-MoreInfo'] = "http://www.imdb.com/title/tt{$releaseData['imdbid']}";
315
-        } elseif (! empty($releaseData['tvdb']) && $releaseData['tvdb'] > 0) {
315
+        } elseif (!empty($releaseData['tvdb']) && $releaseData['tvdb'] > 0) {
316 316
             $headers['X-DNZB-MoreInfo'] = "http://www.thetvdb.com/?tab=series&id={$releaseData['tvdb']}";
317 317
         }
318 318
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         $lastChunk = false;
341 341
 
342 342
         // Stream and modify content in chunks
343
-        while (! gzeof($fileHandle)) {
343
+        while (!gzeof($fileHandle)) {
344 344
             $chunk = gzread($fileHandle, self::BUFFER_SIZE);
345 345
             if ($chunk === false) {
346 346
                 break;
Please login to merge, or discard this patch.