Completed
Push — master ( b0b4e8...4740c5 )
by Stanislav
01:50
created
src/WeburgClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function getSeriesTorrents($movieId, $hashes, $daysMax = 1, $allowedMisses = 0)
68 68
     {
69 69
         $torrentsUrls = [];
70
-        $timestampFrom = strtotime('-' . $daysMax . 'days');
70
+        $timestampFrom = strtotime('-'.$daysMax.'days');
71 71
 
72 72
         $hashes = array_reverse($hashes);
73 73
         foreach ($hashes as $hash) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function movieQuery($q)
138 138
     {
139
-        $resultUrl = 'https://weburg.net/ajax/autocomplete/search/main?' . http_build_query(['q' => $q]);
139
+        $resultUrl = 'https://weburg.net/ajax/autocomplete/search/main?'.http_build_query(['q' => $q]);
140 140
 
141 141
         $jsonRaw = $this->getUrlBody($resultUrl, [
142 142
             'Content-Type' => 'text/html; charset=utf-8',
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
     public static function getMovieUrl($movieId)
153 153
     {
154
-        return 'https://weburg.net/movies/info/' . $movieId;
154
+        return 'https://weburg.net/movies/info/'.$movieId;
155 155
     }
156 156
 
157 157
     /**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         ]);
172 172
 
173 173
         if ($res->getStatusCode() != 200) {
174
-            throw new RuntimeException('Error ' . $res->getStatusCode() . 'while get url ' . $url);
174
+            throw new RuntimeException('Error '.$res->getStatusCode().'while get url '.$url);
175 175
         }
176 176
 
177 177
         sleep($this->requestDelay);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         preg_match('/filename="(.*?)"/', $disposition[0], $res);
210 210
         $filename = $res[1];
211 211
 
212
-        $filePath = $torrentsDir . '/' . $filename;
212
+        $filePath = $torrentsDir.'/'.$filename;
213 213
         file_put_contents($filePath, $torrentBody);
214 214
 
215 215
         return $filePath;
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
     private static function getMovieTorrentUrl($movieId, $hash = '')
237 237
     {
238 238
         return 'https://weburg.net/ajax/download/movie?'
239
-            . ($hash ? 'hash=' . $hash . '&' : '')
240
-            . 'obj_id=' . $movieId;
239
+            . ($hash ? 'hash='.$hash.'&' : '')
240
+            . 'obj_id='.$movieId;
241 241
     }
242 242
 
243 243
     private static function getMovieInfo($body)
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         ];
254 254
 
255 255
         foreach ($checks as $name => $regexp) {
256
-            preg_match('/' . $regexp . '/mis', $body, $res);
256
+            preg_match('/'.$regexp.'/mis', $body, $res);
257 257
             $info[$name] = count($res) ? $res[1] : null;
258 258
         }
259 259
 
Please login to merge, or discard this patch.