From b48c5acf1a8568c40f9dc187c35b9b6a608310ea Mon Sep 17 00:00:00 2001 From: prolic Date: Sat, 11 Oct 2014 21:14:25 +0200 Subject: [PATCH] yoda conditions in prg controller plugin --- library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php b/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php index a2b67efa751..10bb2095e68 100644 --- a/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php +++ b/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php @@ -52,7 +52,7 @@ public function __invoke($redirect = null, $redirectToUrl = false) $container->post = $request->getPost()->toArray(); return $this->redirect($redirect, $redirectToUrl); } else { - if ($container->post !== null) { + if (null !== $container->post) { $post = $container->post; unset($container->post); return $post; @@ -114,14 +114,14 @@ protected function redirect($redirect, $redirectToUrl) * If the user wants to redirect to a route, the redirector has to come * from the plugin manager -- otherwise no router will be injected */ - if ($redirectToUrl === false) { + if (false === $redirectToUrl) { throw new RuntimeException('Could not redirect to a route without a router'); } $redirector = new Redirect(); } - if ($redirectToUrl === false) { + if (false === $redirectToUrl) { $response = $redirector->toRoute($redirect, $params, $options, $reuseMatchedParams); $response->setStatusCode(303); return $response;