@@ -122,7 +122,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -31,7 +31,7 @@ |
||
| 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 | } |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | public function register() |
| 46 | 46 | { |
| 47 | 47 | /** |
| 48 | - * publish migrations |
|
| 49 | - */ |
|
| 48 | + * publish migrations |
|
| 49 | + */ |
|
| 50 | 50 | $this->publishes([__DIR__ . '/../database/migrations' => database_path('migrations')], 'migrations'); |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * Register Facade |
|
| 54 | - */ |
|
| 53 | + * Register Facade |
|
| 54 | + */ |
|
| 55 | 55 | $this->app->bind('Qwatch', function () { |
| 56 | 56 | return (new Qwatcher); |
| 57 | 57 | }); |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | include __DIR__.'/routes.php'; |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | - * Register artisan Commands |
|
| 66 | - */ |
|
| 65 | + * Register artisan Commands |
|
| 66 | + */ |
|
| 67 | 67 | // $this->commands([ |
| 68 | 68 | // \Maqe\Qwatcher\Commands\SomeCommand1::class, |
| 69 | 69 | // \Maqe\Qwatcher\Commands\SomeCommand2::class |
@@ -18,15 +18,15 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -13,7 +13,7 @@ |
||
| 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'); |