Completed
Push — master ( d2ffcb...d9f321 )
by Robin
08:58 queued 05:40
created
src/migrations/2018_08_06_143914_create_crawler_status_logs_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('crawler_status_logs', function (Blueprint $table) {
16
+        Schema::create('crawler_status_logs', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
 
19 19
             $table->integer('status_id');
Please login to merge, or discard this patch.
src/migrations/2018_08_06_143911_create_crawler_status_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('crawler_statuses', function (Blueprint $table) {
16
+        Schema::create('crawler_statuses', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
 
19 19
             $table->integer('crawler_id');
Please login to merge, or discard this patch.
src/migrations/2018_08_06_143904_create_crawlers_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('crawlers', function (Blueprint $table) {
16
+        Schema::create('crawlers', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
 
19 19
             $table->string('name');
Please login to merge, or discard this patch.
src/Models/Crawlers.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
     protected $table = 'crawlers';
14 14
 
15 15
     protected $fillable = [
16
-       'name',
17
-       'description'
16
+        'name',
17
+        'description'
18 18
     ];
19 19
 
20 20
 
Please login to merge, or discard this patch.
src/Http/Controllers/CrawlController.php 1 patch
Spacing   +5 added lines, -5 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) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
             CrawlerStatusLogs::insert($formatted_logs);
291 291
 
292
-            $this->log('Registered crawler logs (count: ' . count($formatted_logs) . ')');
292
+            $this->log('Registered crawler logs (count: '.count($formatted_logs).')');
293 293
         } else {
294 294
             $this->log('Log output is not set, skipping inserting');
295 295
         }
Please login to merge, or discard this patch.
src/Models/CrawlerStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         parent::boot();
20 20
 
21
-        static::deleting(function ($item) {
21
+        static::deleting(function($item) {
22 22
             $item->logs()
23 23
                 ->delete();
24 24
         });
Please login to merge, or discard this patch.