From 1afdcb8c2d20ad3bf4c22b5c10bf98b6a8f5a429 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 11 Sep 2012 14:05:40 -0400 Subject: [PATCH] Shortened an if statement to p ? x : y --- airtime_mvc/application/models/Datatables.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/Datatables.php b/airtime_mvc/application/models/Datatables.php index 6560925de..016ff0362 100644 --- a/airtime_mvc/application/models/Datatables.php +++ b/airtime_mvc/application/models/Datatables.php @@ -192,12 +192,8 @@ class Application_Model_Datatables $r['length'] = $pl->getLength(); } elseif ($r['ftype'] == "block") { $bl = new Application_Model_Block($r['id']); - if ($bl->isStatic()) { - $r['bl_type'] = 'static'; - } else { - $r['bl_type'] = 'dynamic'; - } - $r['length'] = $bl->getLength(); + $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; + $r['length'] = $bl->getLength(); } } }