summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-26 16:35:47 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-04 12:44:28 +0200
commit003c624596dca50662e3ab38a809fab64bf849f5 (patch)
tree545a4af527a3c9d6f5a5cea7641feb2695451c83 /lib/private
parent7f1141f7e9805005c813d5ffd39ebdfa715dd290 (diff)
downloadnextcloud-server-003c624596dca50662e3ab38a809fab64bf849f5.tar.gz
nextcloud-server-003c624596dca50662e3ab38a809fab64bf849f5.zip
Inspections
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Mount/Manager.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php
index 9f0d7647dab..eb5d4c4a458 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -48,7 +48,7 @@ class Manager implements IMountManager {
*/
public function removeMount(string $mountPoint) {
$mountPoint = Filesystem::normalizePath($mountPoint);
- if (strlen($mountPoint) > 1) {
+ if (\strlen($mountPoint) > 1) {
$mountPoint .= '/';
}
unset($this->mounts[$mountPoint]);
@@ -80,15 +80,16 @@ class Manager implements IMountManager {
$foundMountPoint = '';
$mountPoints = array_keys($this->mounts);
foreach ($mountPoints as $mountpoint) {
- if (strpos($path, $mountpoint) === 0 and strlen($mountpoint) > strlen($foundMountPoint)) {
+ if (strpos($path, $mountpoint) === 0 && \strlen($mountpoint) > \strlen($foundMountPoint)) {
$foundMountPoint = $mountpoint;
}
}
+
if (isset($this->mounts[$foundMountPoint])) {
return $this->mounts[$foundMountPoint];
- } else {
- return null;
}
+
+ return null;
}
/**
@@ -101,10 +102,10 @@ class Manager implements IMountManager {
\OC_Util::setupFS();
$path = $this->formatPath($path);
$result = [];
- $pathLength = strlen($path);
+ $pathLength = \strlen($path);
$mountPoints = array_keys($this->mounts);
foreach ($mountPoints as $mountPoint) {
- if (substr($mountPoint, 0, $pathLength) === $path and strlen($mountPoint) > $pathLength) {
+ if (substr($mountPoint, 0, $pathLength) === $path && \strlen($mountPoint) > $pathLength) {
$result[] = $this->mounts[$mountPoint];
}
}
@@ -123,7 +124,7 @@ class Manager implements IMountManager {
*/
public function findByStorageId(string $id): array {
\OC_Util::setupFS();
- if (strlen($id) > 64) {
+ if (\strlen($id) > 64) {
$id = md5($id);
}
$result = [];
@@ -159,7 +160,7 @@ class Manager implements IMountManager {
*/
private function formatPath(string $path): string {
$path = Filesystem::normalizePath($path);
- if (strlen($path) > 1) {
+ if (\strlen($path) > 1) {
$path .= '/';
}
return $path;