From 9344d338a356b6439b742553c3b610696c734069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 29 Apr 2020 10:51:04 +0200 Subject: [PATCH] Fix coding style --- src/Harmony.php | 1 + tests/HarmonyTest.php | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Harmony.php b/src/Harmony.php index 499265f..42ba8b4 100644 --- a/src/Harmony.php +++ b/src/Harmony.php @@ -124,6 +124,7 @@ protected function executeCondition(array $conditionArray): void if ($condition->evaluate($this->request, $this->response) === false) { $this->handle($this->request); + return; } diff --git a/tests/HarmonyTest.php b/tests/HarmonyTest.php index d0fe614..643017d 100644 --- a/tests/HarmonyTest.php +++ b/tests/HarmonyTest.php @@ -184,9 +184,10 @@ static function (Harmony $harmony) use ($middlewareInCondition, $middlewareInCon $harmony->addMiddleware($middlewareInCondition); $harmony->addCondition( new StubCondition(true), - static function (Harmony $harmony) use ($middlewareInCondition2) { + static function (Harmony $harmony) use ($middlewareInCondition2): void { $harmony->addMiddleware($middlewareInCondition2); - }); + } + ); $harmony->addMiddleware($middlewareInCondition3); } ); @@ -217,9 +218,10 @@ static function (Harmony $harmony) use ($middlewareInCondition, $middlewareInCon $harmony->addMiddleware($middlewareInCondition); $harmony->addCondition( new StubCondition(true), - static function (Harmony $harmony) use ($middlewareInCondition2) { + static function (Harmony $harmony) use ($middlewareInCondition2): void { $harmony->addMiddleware($middlewareInCondition2); - }); + } + ); $harmony->addMiddleware($middlewareInCondition3); } ); @@ -250,9 +252,10 @@ static function (Harmony $harmony) use ($middlewareInCondition, $middlewareInCon $harmony->addMiddleware($middlewareInCondition); $harmony->addCondition( new StubCondition(false), - static function (Harmony $harmony) use ($middlewareInCondition2) { + static function (Harmony $harmony) use ($middlewareInCondition2): void { $harmony->addMiddleware($middlewareInCondition2); - }); + } + ); $harmony->addMiddleware($middlewareInCondition3); } );