Skip to content

Commit

Permalink
Merge pull request #9 from achmadhadikurnia/main
Browse files Browse the repository at this point in the history
Add operation duration on command
  • Loading branch information
achmadhadikurnia authored Oct 19, 2023
2 parents fb20261 + 38a6ee1 commit dd6f4e6
Show file tree
Hide file tree
Showing 49 changed files with 196 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Commands/GetAngkaKreditIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetAngkaKreditIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatAngkaKredit' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDataAnakCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDataAnakCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDataOrtuCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDataOrtuCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDataPasanganCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDataPasanganCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDataUtamaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDataUtamaCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDiklatIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDiklatIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatDiklat' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetDownloadDokCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetDownloadDokCommand extends Command
*/
public function handle()
{
$start = now();
$this->comment('{"filePath":"string"}');

$query = json_decode($this->ask('Copy the json above, fill it and paste it here'), true);
Expand All @@ -42,6 +43,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetHukdisIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetHukdisIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatHukdis' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetJabatanIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetJabatanIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatJabatan' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetJabatanPnsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetJabatanPnsCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetKursusIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetKursusIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatKursus' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetListKpInstansiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetListKpInstansiCommand extends Command
*/
public function handle()
{
$start = now();
$periode = $this->argument('periode');
$query = [
'periode' => $periode,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetListPengadaanInstansiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetListPengadaanInstansiCommand extends Command
*/
public function handle()
{
$start = now();
$tahun = $this->argument('tahun');
$query = [
'tahun' => $tahun,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetListPensiunInstansiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class GetListPensiunInstansiCommand extends Command
*/
public function handle()
{
$start = now();
$tglAwal = $this->argument('tglAwal');
$tglAkhir = $this->argument('tglAkhir');
$query = [
Expand All @@ -40,6 +41,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetPenghargaanIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetPenghargaanIdCommand extends Command
*/
public function handle()
{
$start = now();
$id = $this->argument('id');
$paths = [
'idRiwayatPenghargaan' => $id,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetReferensiUnorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ class GetReferensiUnorCommand extends Command
*/
public function handle()
{
$start = now();
$this->info(json_encode(
Simpeg::getReferensiUnor()->object(),
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwAngkaKreditCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwAngkaKreditCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwCltnCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwCltnCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwDiklatCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwDiklatCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwDp3Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwDp3Command extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwGolonganCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwGolonganCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Commands/GetRwHukdisCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetRwHukdisCommand extends Command
*/
public function handle()
{
$start = now();
$nipBaru = $this->argument('nipBaru');
$paths = [
'nipBaru' => $nipBaru,
Expand All @@ -37,6 +38,9 @@ public function handle()
JSON_PRETTY_PRINT
));

$this->newLine();
$this->comment("Processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
}
Loading

0 comments on commit dd6f4e6

Please sign in to comment.