Completed
Push — master ( 04b026...44dd84 )
by Robin
03:54
created
src/Http/Controllers/CrawlController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 $this->log('Checking if crawler is enabled');
117 117
                 if (!$this->crawler->enabled) {
118 118
                     $this->log('Crawler is not enabled');
119
-                    throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - crawler isnt enabled in database');
119
+                    throw new CrawlerException('Crawler (#'.$this->crawler_id.') - crawler isnt enabled in database');
120 120
                 }
121 121
 
122 122
                 $this->log('Checking if crawler can be runned');
@@ -148,16 +148,16 @@  discard block
 block discarded – undo
148 148
                         }
149 149
 
150 150
                         $this->log('Last crawler failed, force run is not enabled');
151
-                        throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - last run had an error and override_fail_status is not enabled');
151
+                        throw new CrawlerException('Crawler (#'.$this->crawler_id.') - last run had an error and override_fail_status is not enabled');
152 152
                     }
153 153
                 } else {
154 154
                     $this->log('Crawler needs to wait ('.$checkIfCrawlerCanBeRunned['retry_in'].' seconds) before running again');
155
-                    throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait ' . $checkIfCrawlerCanBeRunned['retry_in'] . ' more seconds to run');
155
+                    throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait '.$checkIfCrawlerCanBeRunned['retry_in'].' more seconds to run');
156 156
                 }
157 157
 
158 158
                 if ($x == $times) {
159 159
                     $this->log('Crawler exceeded the max execution time');
160
-                    $this->failCrawler('Crawler (#' . $this->crawler_id . ') - max execution time');
160
+                    $this->failCrawler('Crawler (#'.$this->crawler_id.') - max execution time');
161 161
                 }
162 162
 
163 163
                 if ($this->crawler->status == 1) {
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
         if ($crawlerstatus->save()) {
248 248
             $this->log('Registered status ('.$status.')');
249 249
 
250
-            if($this->crawler) {
251
-                $this->log('Setting crawler latest status (' . $status . ') attribute');
250
+            if ($this->crawler) {
251
+                $this->log('Setting crawler latest status ('.$status.') attribute');
252 252
 
253 253
                 $this->crawler->latest_status = $status;
254 254
 
255 255
                 $this->crawler->save();
256
-                $this->log('Set crawler latest status (' . $status . ') attribute');
256
+                $this->log('Set crawler latest status ('.$status.') attribute');
257 257
             }
258 258
 
259 259
             if (!empty($output)) {
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
             CrawlerStatusLogs::insert($formatted_logs);
297 297
 
298
-            $this->log('Registered crawler logs (count: ' . count($formatted_logs) . ')');
298
+            $this->log('Registered crawler logs (count: '.count($formatted_logs).')');
299 299
         } else {
300 300
             $this->log('Log output is not set, skipping inserting');
301 301
         }
Please login to merge, or discard this patch.