aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Route/Router.php
diff options
context:
space:
mode:
authorFaraz Samapoor <fsamapoor@gmail.com>2023-05-15 15:17:19 +0330
committerFaraz Samapoor <fsamapoor@gmail.com>2023-05-15 15:17:19 +0330
commite7cc7653b885c49b1b3f0a78f91ea05a53e102d8 (patch)
tree42da61d5c6e988d7c9eff7e081327a73f661dc89 /lib/private/Route/Router.php
parent8bdb50fd507bfe68161ab98eba903872083ea4f3 (diff)
downloadnextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.tar.gz
nextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.zip
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
Diffstat (limited to 'lib/private/Route/Router.php')
-rw-r--r--lib/private/Route/Router.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index e2a092d861e..fe97623176d 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -361,7 +361,7 @@ class Router implements IRouter {
$referenceType = UrlGenerator::ABSOLUTE_PATH;
}
$name = $this->fixLegacyRootName($name);
- if (strpos($name, '.') !== false) {
+ if (str_contains($name, '.')) {
[$appName, $other] = explode('.', $name, 3);
// OCS routes are prefixed with "ocs."
if ($appName === 'ocs') {