From 6b45aa0a95d45b392d8c0bba65257db2cbbb2d7f Mon Sep 17 00:00:00 2001 From: Malte Gerth Date: Mon, 30 Jun 2014 11:46:39 +0200 Subject: [PATCH 1/4] removed unused assignments in conditions --- src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php b/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php index c6f553ac..4ca04fa1 100644 --- a/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php +++ b/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php @@ -57,8 +57,8 @@ public function onError(MvcEvent $event) { // Do nothing if no error or if response is not HTTP response if (!($exception = $event->getParam('exception') instanceof UnauthorizedExceptionInterface) - || ($result = $event->getResult() instanceof HttpResponse) - || !($response = $event->getResponse() instanceof HttpResponse) + || ($event->getResult() instanceof HttpResponse) + || !($event->getResponse() instanceof HttpResponse) ) { return; } From 71a0982091f475a169cc22a1fc28ad22f0450bd6 Mon Sep 17 00:00:00 2001 From: Malte Gerth Date: Mon, 30 Jun 2014 11:47:42 +0200 Subject: [PATCH 2/4] removed unused assignments in conditions --- src/ZfcRbac/View/Strategy/RedirectStrategy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZfcRbac/View/Strategy/RedirectStrategy.php b/src/ZfcRbac/View/Strategy/RedirectStrategy.php index b87d5167..d9be022a 100644 --- a/src/ZfcRbac/View/Strategy/RedirectStrategy.php +++ b/src/ZfcRbac/View/Strategy/RedirectStrategy.php @@ -63,8 +63,8 @@ public function onError(MvcEvent $event) { // Do nothing if no error or if response is not HTTP response if (!($exception = $event->getParam('exception') instanceof UnauthorizedExceptionInterface) - || ($result = $event->getResult() instanceof HttpResponse) - || !($response = $event->getResponse() instanceof HttpResponse) + || ($event->getResult() instanceof HttpResponse) + || !($event->getResponse() instanceof HttpResponse) ) { return; } From cfea48b7618524233ea049a66bc9f2dc475495e5 Mon Sep 17 00:00:00 2001 From: Malte Gerth Date: Mon, 30 Jun 2014 11:54:18 +0200 Subject: [PATCH 3/4] removed unused assignments in conditions --- src/ZfcRbac/View/Strategy/RedirectStrategy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZfcRbac/View/Strategy/RedirectStrategy.php b/src/ZfcRbac/View/Strategy/RedirectStrategy.php index d9be022a..5110d11c 100644 --- a/src/ZfcRbac/View/Strategy/RedirectStrategy.php +++ b/src/ZfcRbac/View/Strategy/RedirectStrategy.php @@ -62,7 +62,7 @@ public function __construct(RedirectStrategyOptions $options, AuthenticationServ public function onError(MvcEvent $event) { // Do nothing if no error or if response is not HTTP response - if (!($exception = $event->getParam('exception') instanceof UnauthorizedExceptionInterface) + if (!($event->getParam('exception') instanceof UnauthorizedExceptionInterface) || ($event->getResult() instanceof HttpResponse) || !($event->getResponse() instanceof HttpResponse) ) { From 70b4d77e5350bae729ff0f1842b3b822158fe6ff Mon Sep 17 00:00:00 2001 From: Malte Gerth Date: Mon, 30 Jun 2014 11:54:32 +0200 Subject: [PATCH 4/4] removed unused assignments in conditions --- src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php b/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php index 4ca04fa1..6a0f791b 100644 --- a/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php +++ b/src/ZfcRbac/View/Strategy/UnauthorizedStrategy.php @@ -56,7 +56,7 @@ public function __construct(UnauthorizedStrategyOptions $options) public function onError(MvcEvent $event) { // Do nothing if no error or if response is not HTTP response - if (!($exception = $event->getParam('exception') instanceof UnauthorizedExceptionInterface) + if (!($event->getParam('exception') instanceof UnauthorizedExceptionInterface) || ($event->getResult() instanceof HttpResponse) || !($event->getResponse() instanceof HttpResponse) ) {