Skip to content

Commit 5781b48

Browse files
Merge pull request #62 from laravelwebdev/analysis-013QEW
Apply fixes from StyleCI
2 parents a0f4666 + 56f4eac commit 5781b48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/Helpers/Helper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use App\Models\Template;
1818
use App\Models\UnitKerja;
1919
use App\Models\User;
20-
use Illuminate\Database\Query\Builder;
2120
use Illuminate\Support\Carbon;
2221
use Illuminate\Support\Facades\Storage;
2322
use Illuminate\Support\Str;
@@ -390,16 +389,17 @@ public static function getUsersByPengelola($role, $tanggal, $unit_kerja_id = nul
390389
->where('active', '<=', $tanggal)
391390
->where(function ($query) use ($tanggal) {
392391
return $query->where('inactive', '>', $tanggal)
393-
->orWhere('inactive', '=', null);
392+
->orWhere('inactive', '=', null);
394393
})
395394
->pluck('user_id')
396395
->toArray();
397-
if ( $unit_kerja_id == null) {
396+
if ($unit_kerja_id == null) {
398397
$usersId = $usersIdByPengelola;
399398
} else {
400399
$usersIdByUnitKerja = DataPegawai::cache()->get('all')->where('unit_kerja_id', $unit_kerja_id)->where('tanggal', '<=', $tanggal)->pluck('user_id')->toArray();
401400
$usersId = array_intersect($usersIdByPengelola, $usersIdByUnitKerja);
402401
}
402+
403403
return User::cache()->get('all')->whereIn('id', $usersId);
404404
}
405405

@@ -947,6 +947,6 @@ public static function setOptionTahun()
947947

948948
public static function setOptionPengelola($role, $tanggal, $unitKerjaId = null)
949949
{
950-
return self::setOptions(self::getUsersByPengelola($role, $tanggal, $unitKerjaId),'id','name');
950+
return self::setOptions(self::getUsersByPengelola($role, $tanggal, $unitKerjaId), 'id', 'name');
951951
}
952952
}

0 commit comments

Comments
 (0)