From e7cc7653b885c49b1b3f0a78f91ea05a53e102d8 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Mon, 15 May 2023 15:17:19 +0330 Subject: Refactors "strpos" calls in lib/private to improve code readability. Signed-off-by: Faraz Samapoor --- lib/private/Template/JSResourceLocator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Template/JSResourceLocator.php') diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index 61611c69b0f..ab5de182d89 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -52,7 +52,7 @@ class JSResourceLocator extends ResourceLocator { $app = substr($script, 0, strpos($script, '/')); $scriptName = basename($script); - if (strpos($script, '/l10n/') !== false) { + if (str_contains($script, '/l10n/')) { // For language files we try to load them all, so themes can overwrite // single l10n strings without having to translate all of them. $found = 0; @@ -113,7 +113,7 @@ class JSResourceLocator extends ResourceLocator { } // missing translations files will be ignored - if (strpos($script, 'l10n/') === 0) { + if (str_starts_with($script, 'l10n/')) { return; } -- cgit v1.2.3