Completed
Push — master ( ae29ce...9492ba )
by Stanislav
03:54
created
src/WeburgClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function getSeriesTorrents($movieId, $hashes, $daysMax = 1, $allowedMisses = 0)
52 52
     {
53 53
         $torrentsUrls = [];
54
-        $timestampFrom = strtotime('-' . $daysMax . 'days');
54
+        $timestampFrom = strtotime('-'.$daysMax.'days');
55 55
 
56 56
         $hashes = array_reverse($hashes);
57 57
         foreach ($hashes as $hash) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function getMovieUrl($movieId)
94 94
     {
95
-        return 'https://weburg.net/movies/info/' . $movieId;
95
+        return 'https://weburg.net/movies/info/'.$movieId;
96 96
     }
97 97
 
98 98
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         ]);
112 112
 
113 113
         if ($res->getStatusCode() != 200) {
114
-            throw new \RuntimeException('Error ' . $res->getStatusCode() . 'while get url ' . $url);
114
+            throw new \RuntimeException('Error '.$res->getStatusCode().'while get url '.$url);
115 115
         }
116 116
 
117 117
         sleep($this->requestDelay);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         preg_match('/filename="(.*?)"/', $disposition[0], $res);
148 148
         $filename = $res[1];
149 149
 
150
-        $filePath = $torrentsDir . '/' . $filename;
150
+        $filePath = $torrentsDir.'/'.$filename;
151 151
         file_put_contents($filePath, $torrentBody);
152 152
 
153 153
         return $filePath;
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
     private function getMovieTorrentUrl($movieId, $hash = '')
175 175
     {
176 176
         return 'https://weburg.net/ajax/download/movie?'
177
-        . ($hash ? 'hash=' . $hash . '&' : '')
178
-        . 'obj_id=' . $movieId;
177
+        . ($hash ? 'hash='.$hash.'&' : '')
178
+        . 'obj_id='.$movieId;
179 179
     }
180 180
 
181 181
     private function getMovieInfo($body)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         ];
192 192
 
193 193
         foreach ($checks as $name => $regexp) {
194
-            preg_match('/' . $regexp . '/mis', $body, $res);
194
+            preg_match('/'.$regexp.'/mis', $body, $res);
195 195
             $info[$name] = count($res) ? $res[1] : null;
196 196
         }
197 197
 
Please login to merge, or discard this patch.