Completed
Push — master ( 0c0a07...85110e )
by Unnawut
41s
created
src/QwatcherServiceProvider.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Queue;
4 4
 use Illuminate\Support\ServiceProvider;
5
-use Illuminate\Support\Facades\Log;
6 5
 
7 6
 class QwatcherServiceProvider extends ServiceProvider
8 7
 {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function boot()
20 20
     {
21
-        Queue::before(function ($job) {
21
+        Queue::before(function($job) {
22 22
             Qwatch::tracks(new ProcessTracks($job->job->getJobId(), $job->job));
23 23
         });
24 24
 
25
-        Queue::after(function ($job) {
25
+        Queue::after(function($job) {
26 26
             Qwatch::tracks(new SucceedTracks($job->job->getJobId(), $job->job));
27 27
         });
28 28
 
29
-        Queue::failing(function (JobFailed $job) {
29
+        Queue::failing(function(JobFailed $job) {
30 30
             // dd($event);
31 31
             Qwatch::tracks(new FailedTracks($job->job->getJobId(), $job->job));
32 32
         });
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
         /**
48 48
         * publish migrations
49 49
         */
50
-        $this->publishes([__DIR__ . '/../database/migrations' => database_path('migrations')], 'migrations');
50
+        $this->publishes([__DIR__.'/../database/migrations' => database_path('migrations')], 'migrations');
51 51
 
52 52
         /**
53 53
         * Register Facade
54 54
         */
55
-        $this->app->bind('Qwatch', function () {
55
+        $this->app->bind('Qwatch', function() {
56 56
             return (new Qwatcher);
57 57
         });
58 58
 
Please login to merge, or discard this patch.
src/Tracks/TracksAbstract.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Illuminate\Queue\Queue;
4 4
 use Carbon\Carbon;
5
-use Maqe\Qwatcher\Tracks\Enums\StatusType;
6 5
 
7 6
 abstract class TracksAbstract extends Queue
8 7
 {
Please login to merge, or discard this patch.
src/Traits/WatchableDispatchesJobs.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Maqe\Qwatcher\Traits;
4 4
 
5
-use DB;
6 5
 use Illuminate\Contracts\Bus\Dispatcher;
7 6
 
8 7
 trait WatchableDispatchesJobs
Please login to merge, or discard this patch.
src/Qwatcher.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php namespace Maqe\Qwatcher;
2 2
 
3 3
 use Illuminate\Database\Eloquent\Builder;
4
-use Illuminate\Database\Eloquent\Collection;
5
-use Illuminate\Pagination\LengthAwarePaginator;
6 4
 use Maqe\Qwatcher\Tracks\Enums\StatusType;
7 5
 use Maqe\Qwatcher\Tracks\TracksInterface;
8 6
 use Maqe\Qwatcher\Tracks\Tracks;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function getByStatus($status, $per_page = null)
124 124
     {
125
-        if(!in_array($status, $this->statusable)) {
125
+        if (!in_array($status, $this->statusable)) {
126 126
             throw new \InvalidArgumentException('"'.$status.'" is not allowed in status type');
127 127
         }
128 128
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getByJobName($name, $per_page = null)
154 154
     {
155
-        $collecName = strtolower(str_replace('_', '%',$name));
155
+        $collecName = strtolower(str_replace('_', '%', $name));
156 156
         $condition = "`tracks`.`job_name` LIKE '%{$collecName}%'";
157 157
         $builder = Tracks::whereRaw($condition);
158 158
 
Please login to merge, or discard this patch.
src/TracksController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use App\Http\Controllers\Controller;
4 4
 use Illuminate\Http\Request;
5
-use Maqe\Qwatcher\Tracks\Tracks;
6 5
 use Qwatcher;
7 6
 
8 7
 class TracksController extends Controller
Please login to merge, or discard this patch.
src/Tracks/Transformers/TrackTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function transforms(Collection $tracks)
33 33
     {
34
-        return $tracks->each(function ($track) {
34
+        return $tracks->each(function($track) {
35 35
             $track = $this->transform($track);
36 36
         });
37 37
     }
Please login to merge, or discard this patch.
database/migrations/2016_10_20_071609_create_tracks_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('tracks', function (Blueprint $table) {
16
+        Schema::create('tracks', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('driver');
19 19
             $table->integer('queue_id');
Please login to merge, or discard this patch.