summaryrefslogtreecommitdiffstats
path: root/core/Controller/ClientFlowLoginV2Controller.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 13:13:19 +0330
committerFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 13:13:19 +0330
commita1ef0285f89112b8777eb47f3c34d07f111660b4 (patch)
treebd8791fd09d6c18e3859d44382de9ef0f8ead10e /core/Controller/ClientFlowLoginV2Controller.php
parent09c5f997c6d185d8b23b37a996e7a1130a426d75 (diff)
downloadnextcloud-server-a1ef0285f89112b8777eb47f3c34d07f111660b4.tar.gz
nextcloud-server-a1ef0285f89112b8777eb47f3c34d07f111660b4.zip
Refactors "strpos" calls in /core to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'core/Controller/ClientFlowLoginV2Controller.php')
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index ef16cfbd04b..0c12f1a612f 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -363,9 +363,9 @@ class ClientFlowLoginV2Controller 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/v2') !== false) {
+ } elseif (str_contains($this->request->getRequestUri(), '/login/v2')) {
$serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/login/v2'));
}