Commit 496fb5df by Triyah Fatmawati

Optimize if clause

parent efd677d3
......@@ -74,10 +74,7 @@ public function getFileName($tahun, $nosurat){
$response = $client->request('GET', 'https://e-office.unesa.ac.id/api/show-surat-keluar/'.$tahun.'/'.$nosurat);
$data = json_decode($response->getBody(), true);
if (is_null($data)) {
$namafile = '';
}
if (empty($data)) {
if (is_null($data) || empty($data)) {
$namafile = '';
}
else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment