Skip to content

Commit 9c18a23

Browse files
Merge pull request #100 from laravelwebdev/analysis-EPZJ2m
Apply fixes from StyleCI
2 parents 06bd764 + 2be5085 commit 9c18a23

File tree

9 files changed

+9
-20
lines changed

9 files changed

+9
-20
lines changed

app/Console/Commands/Resource.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public function handle()
2828
$modelNama = $this->argument('modelName');
2929

3030
$this->call('make:model', ['name' => $modelNama, '-m' => true]);
31-
$this->call('make:policy', ['name' => $modelNama . 'Policy']);
31+
$this->call('make:policy', ['name' => $modelNama.'Policy']);
3232
$this->call('nova:resource', ['name' => $modelNama]);
33-
3433
}
3534
}

app/Models/KerangkaAcuan.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ protected static function booted(): void
100100
$kak->deleteAssociatedRecords();
101101
$ids = PerjalananDinas::where('kerangka_acuan_id', $kak->id)->pluck('id');
102102
PerjalananDinas::destroy($ids);
103-
104103
});
105104

106105
static::created(function (KerangkaAcuan $kak) {

app/Models/MasterWilayah.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ public static function cacheEntities(): array
2323
}),
2424
];
2525
}
26-
2726
}

app/Models/RateTranslok.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
class RateTranslok extends Model
1111
{
1212
use LaraCache;
13+
1314
public static function cacheEntities(): array
1415
{
1516
return [
@@ -26,6 +27,7 @@ public static function cacheEntities(): array
2627
'tujuan_master_wilayah_id',
2728

2829
];
30+
2931
public function getTitleAttribute()
3032
{
3133
return "{$this->asalMasterWilayah->wilayah} - {$this->tujuanMasterWilayah->wilayah} ({$this->skTranslok->tahun})";
@@ -45,7 +47,4 @@ public function tujuanMasterWilayah(): BelongsTo
4547
{
4648
return $this->belongsTo(MasterWilayah::class, 'tujuan_master_wilayah_id');
4749
}
48-
49-
50-
5150
}

app/Models/SkTranslok.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ public function rateTransloks(): HasMany
2929
{
3030
return $this->hasMany(RateTranslok::class);
3131
}
32-
3332
}

app/Models/UserEksternal.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ class UserEksternal extends Model
1313

1414
public function setGolonganAttribute($value)
1515
{
16-
if (! empty($this->attributes['golongan']))
17-
{
16+
if (! empty($this->attributes['golongan'])) {
1817
$this->attributes['golongan'] = $value;
1918
$this->attributes['pangkat'] = Helper::$pangkat[$value];
2019
}
21-
2220
}
23-
21+
2422
public static function cacheEntities(): array
2523
{
2624
return [

app/Nova/Actions/AddPerjalananDinas.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
namespace App\Nova\Actions;
44

5-
use App\Helpers\Helper;
65
use App\Models\PerjalananDinas;
76
use Illuminate\Bus\Queueable;
8-
use Illuminate\Contracts\Queue\ShouldQueue;
97
use Illuminate\Queue\InteractsWithQueue;
108
use Illuminate\Support\Collection;
119
use Laravel\Nova\Actions\Action;
1210
use Laravel\Nova\Actions\ActionResponse;
1311
use Laravel\Nova\Fields\ActionFields;
14-
use Laravel\Nova\Fields\Select;
1512
use Laravel\Nova\Http\Requests\NovaRequest;
1613

1714
class AddPerjalananDinas extends Action
@@ -23,7 +20,6 @@ public function name()
2320
return 'Tambahkan Perjalalan Dinas';
2421
}
2522

26-
2723
/**
2824
* Perform the action on the given models.
2925
*
@@ -42,7 +38,6 @@ public function handle(ActionFields $fields, Collection $models)
4238
$perjalanan->save();
4339

4440
return ActionResponse::redirect('perjalanan-dinas/'.$perjalanan->id.'/edit');
45-
4641
}
4742

4843
/**

app/Nova/RateTranslok.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public static function label()
3232
*/
3333
public static $title = 'title';
3434

35-
public function subtitle(){
35+
public function subtitle()
36+
{
3637
return Helper::formatUang($this->rate);
3738
}
3839

@@ -42,7 +43,7 @@ public function subtitle(){
4243
* @var array
4344
*/
4445
public static $search = [
45-
'asalMasterWilayah.wilayah', 'tujuanMasterWilayah.wilayah'
46+
'asalMasterWilayah.wilayah', 'tujuanMasterWilayah.wilayah',
4647
];
4748

4849
/**

app/Nova/SkTranslok.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Laravel\Nova\Http\Requests\NovaRequest;
1313

1414
class SkTranslok extends Resource
15-
{
15+
{
1616
public static $with = ['rateTransloks'];
1717
/**
1818
* The model the resource corresponds to.

0 commit comments

Comments
 (0)