Skip to content

Commit bacdc2c

Browse files
Merge pull request #33 from laravelwebdev/analysis-vZjJgx
Apply fixes from StyleCI
2 parents aa14f09 + b2e02de commit bacdc2c

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

app/Helpers/Helper.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ public static function terbilangHari($tanggal)
633633
/**
634634
* Mengubah bulan ke nama bulan.
635635
*
636-
* @param Int $bulan
636+
* @param int $bulan
637637
* @return string
638638
*/
639639
public static function terbilangBulan($bulan)
@@ -655,7 +655,7 @@ public static function formatRupiah($angka)
655655
}
656656

657657
/**
658-
* Upper case nama tanpa gelar
658+
* Upper case nama tanpa gelar.
659659
*
660660
* @param string $nama
661661
* @return string
@@ -667,7 +667,6 @@ public static function upperNamaTanpaGelar($nama)
667667
return strtoupper($hasil);
668668
}
669669

670-
671670
/**
672671
* Mengubah angka ke format uang.
673672
*
@@ -690,7 +689,7 @@ public static function formatUang($angka)
690689
*/
691690
public static function jangkaWaktuHariKalender($awal, $akhir)
692691
{
693-
$selisih = ($awal->diff($akhir))->format('%a') + 1;
692+
$selisih = $awal->diff($akhir)->format('%a') + 1;
694693

695694
return $selisih.' ( '.self::terbilang($selisih).') Hari Kalender';
696695
}
@@ -707,12 +706,16 @@ public static function formatSpek($spesifikasi)
707706
$spek = collect($spesifikasi);
708707
$spek->transform(function ($item, $index) {
709708
$item['spek_no'] = $index + 1;
710-
if (isset($item['spek_harga'])) $item['spek_harga'] = self::formatRupiah($item['spek_harga']);
711-
if (isset($item['spek_nilai'])) $item['spek_nilai'] = self::formatRupiah($item['spek_nilai']);
709+
if (isset($item['spek_harga'])) {
710+
$item['spek_harga'] = self::formatRupiah($item['spek_harga']);
711+
}
712+
if (isset($item['spek_nilai'])) {
713+
$item['spek_nilai'] = self::formatRupiah($item['spek_nilai']);
714+
}
715+
712716
return $item;
713717
})->toArray();
718+
714719
return $spek;
715720
}
716-
717-
718721
}

app/Models/NaskahKeluar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected static function booted(): void
3131
$naskah->tahun = Carbon::createFromFormat('Y-m-d', $naskah->tanggal->format('Y-m-d'))->year;
3232
}
3333
});
34-
static::creating(function (NaskahKeluar $naskah) {
34+
static::creating(function (NaskahKeluar $naskah) {
3535
$naskah->unit_kerja_id = Auth::user()->unit_kerja_id;
3636
});
3737
}

app/Nova/NaskahKeluar.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use App\Helpers\Helper;
66
use App\Models\JenisNaskah;
77
use App\Models\KodeArsip;
8-
use Carbon\Carbon;
98
use Laravel\Nova\Fields\Date;
109
use Laravel\Nova\Fields\File;
1110
use Laravel\Nova\Fields\FormData;

app/Nova/NaskahMasuk.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use App\Helpers\Helper;
66
use App\Models\JenisNaskah;
7-
use Carbon\Carbon;
87
use Illuminate\Support\Facades\Storage;
98
use Laravel\Nova\Fields\Date;
109
use Laravel\Nova\Fields\File;

0 commit comments

Comments
 (0)