From 53f3b34b814fac4c1fdb9974745f1636f23134ac Mon Sep 17 00:00:00 2001 From: Maks3w Date: Mon, 4 Jan 2016 19:11:00 +0100 Subject: [PATCH] Remove useless isset for declared attributes --- src/Controller/Plugin/FilePostRedirectGet.php | 2 +- src/Controller/Plugin/PostRedirectGet.php | 2 +- src/View/Console/RouteNotFoundStrategy.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/Plugin/FilePostRedirectGet.php b/src/Controller/Plugin/FilePostRedirectGet.php index 02fe3a415..17e578f79 100644 --- a/src/Controller/Plugin/FilePostRedirectGet.php +++ b/src/Controller/Plugin/FilePostRedirectGet.php @@ -169,7 +169,7 @@ function ($input, $value) { */ public function getSessionContainer() { - if (!isset($this->sessionContainer)) { + if (!$this->sessionContainer) { $this->sessionContainer = new Container('file_prg_post1'); } return $this->sessionContainer; diff --git a/src/Controller/Plugin/PostRedirectGet.php b/src/Controller/Plugin/PostRedirectGet.php index f503b57ce..2a2dd52bf 100644 --- a/src/Controller/Plugin/PostRedirectGet.php +++ b/src/Controller/Plugin/PostRedirectGet.php @@ -67,7 +67,7 @@ public function __invoke($redirect = null, $redirectToUrl = false) */ public function getSessionContainer() { - if (!isset($this->sessionContainer)) { + if (!$this->sessionContainer) { $this->sessionContainer = new Container('prg_post1'); } return $this->sessionContainer; diff --git a/src/View/Console/RouteNotFoundStrategy.php b/src/View/Console/RouteNotFoundStrategy.php index a3283cd46..122279bb5 100644 --- a/src/View/Console/RouteNotFoundStrategy.php +++ b/src/View/Console/RouteNotFoundStrategy.php @@ -450,7 +450,7 @@ protected function reportNotFoundReason($e) return ''; } - $reason = (isset($this->reason) && !empty($this->reason)) ? $this->reason : 'unknown'; + $reason = (!empty($this->reason)) ? $this->reason : 'unknown'; $reasons = [ Application::ERROR_CONTROLLER_NOT_FOUND => 'Could not match to a controller', Application::ERROR_CONTROLLER_INVALID => 'Invalid controller specified',