From fedf9c69d9c84fc0399badef39ed765de72c08f1 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 19 Aug 2020 17:54:00 +0200 Subject: Use matching parameter names form interfaces and implementations Found by Psalm 3.14.1 Signed-off-by: Morris Jobke --- apps/files_external/lib/Lib/Auth/Password/UserProvided.php | 4 ++-- apps/files_external/lib/Lib/Storage/SMB.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/files_external/lib/Lib') diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php index f809cd6db6f..da7161a5239 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php @@ -64,8 +64,8 @@ class UserProvided extends AuthMechanism implements IUserProvided { return self::CREDENTIALS_IDENTIFIER_PREFIX . $storageId; } - public function saveBackendOptions(IUser $user, $id, array $options) { - $this->credentialsManager->store($user->getUID(), $this->getCredentialsIdentifier($id), [ + public function saveBackendOptions(IUser $user, $mountId, array $options) { + $this->credentialsManager->store($user->getUID(), $this->getCredentialsIdentifier($mountId), [ 'user' => $options['user'], // explicitly copy the fields we want instead of just passing the entire $options array 'password' => $options['password'] // this way we prevent users from being able to modify any other field ]); diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index ce37d556129..404aa4e12de 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -530,7 +530,7 @@ class SMB extends Common implements INotifyStorage { } } - public function touch($path, $time = null) { + public function touch($path, $mtime = null) { try { if (!$this->file_exists($path)) { $fh = $this->share->write($this->buildPath($path)); -- cgit v1.2.3