From dba3113035af9595cfe8895c372af370cd81d6ed Mon Sep 17 00:00:00 2001 From: xamgore <xamgore@ya.ru> Date: Wed, 2 Sep 2015 17:02:01 +0300 Subject: [PATCH] Smoker code style --- .../classes/Controller/Environment/Office.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/~dev_rating/application/classes/Controller/Environment/Office.php b/~dev_rating/application/classes/Controller/Environment/Office.php index ed58820d8..84cf02a91 100644 --- a/~dev_rating/application/classes/Controller/Environment/Office.php +++ b/~dev_rating/application/classes/Controller/Environment/Office.php @@ -14,14 +14,12 @@ class Controller_Environment_Office extends Controller_Environment_User $this->user->checkAccess(User::RIGHTS_DEAN | User::RIGHTS_ADMIN); // todo: move to twig - - - $menu = []; - if ($this->user->isAdmin()) { - $menu = Model_System::loadConfig('sidePanel/admin.json'); - } elseif ($this->user->isDean()) { - $menu = Model_System::loadConfig('sidePanel/dean.json'); - } + $menu = Model_System::loadConfig( + $this->user->isAdmin() + ? 'sidePanel/admin.json' + : $this->user->isDean() + ? 'sidePanel/dean.json' + : []); $this->twig->set_global('SidePanel', $menu); } -- GitLab