From a1ef0285f89112b8777eb47f3c34d07f111660b4 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Fri, 2 Jun 2023 13:13:19 +0330 Subject: Refactors "strpos" calls in /core to improve code readability. Signed-off-by: Faraz Samapoor --- core/Controller/ClientFlowLoginController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/Controller/ClientFlowLoginController.php') diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 85a793bd92b..2876621c97b 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -368,9 +368,9 @@ class ClientFlowLoginController extends Controller { private function getServerPath(): string { $serverPostfix = ''; - if (strpos($this->request->getRequestUri(), '/index.php') !== false) { + if (str_contains($this->request->getRequestUri(), '/index.php')) { $serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/index.php')); - } elseif (strpos($this->request->getRequestUri(), '/login/flow') !== false) { + } elseif (str_contains($this->request->getRequestUri(), '/login/flow')) { $serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/login/flow')); } -- cgit v1.2.3