aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit
diff options
context:
space:
mode:
authorHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-07 04:37:57 +0330
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-23 15:54:10 +0100
commit7bf31df0bc340872a7fb0ce1eb8d11d036189166 (patch)
tree7b2e9d7c6128395a5c49cbd38d1cde41a8d4e984 /apps/dav/tests/unit
parenta88c1bdfb61d4c141d90e6864971f6d456417604 (diff)
downloadnextcloud-server-7bf31df0bc340872a7fb0ce1eb8d11d036189166.tar.gz
nextcloud-server-7bf31df0bc340872a7fb0ce1eb8d11d036189166.zip
Refactors "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FileTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index 884245afa3b..36dc550a8a3 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -1134,7 +1134,7 @@ class FileTest extends TestCase {
$realPath = $storage->getSourcePath($internalPath);
$dh = opendir($realPath);
while (($file = readdir($dh)) !== false) {
- if (substr($file, strlen($file) - 5, 5) === '.part') {
+ if (str_ends_with($file, '.part')) {
$files[] = $file;
}
}