From 0c6dcdba6b890dc170f59a461ab80961a85a53db Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 20 Sep 2013 22:45:22 +0200 Subject: [PATCH] Add missing implements and fix parameters in IConfig --- lib/allconfig.php | 1 - lib/navigationmanager.php | 2 +- lib/public/iconfig.php | 22 ++++++++++++++-------- lib/public/idbconnection.php | 3 +++ lib/user/session.php | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lib/allconfig.php b/lib/allconfig.php index 353608e5d2..72aabf6079 100644 --- a/lib/allconfig.php +++ b/lib/allconfig.php @@ -65,7 +65,6 @@ class AllConfig implements \OCP\IConfig { \OCP\Config::setUserValue($userId, $appName, $key, $value); } - /** * Shortcut for getting a user defined value * @param string $userId the userId of the user that we want to store the value under diff --git a/lib/navigationmanager.php b/lib/navigationmanager.php index cf3bf84d99..1f657b9ad8 100644 --- a/lib/navigationmanager.php +++ b/lib/navigationmanager.php @@ -12,7 +12,7 @@ namespace OC; /** * Manages the ownCloud navigation */ -class NavigationManager { +class NavigationManager implements \OCP\INavigationManager { protected $entries = array(); protected $activeEntry; diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php index dab4590969..850bddf693 100644 --- a/lib/public/iconfig.php +++ b/lib/public/iconfig.php @@ -1,10 +1,12 @@ +/** + * Copyright (c) 2013 Bart Visscher * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. * */ + namespace OCP; /** @@ -29,31 +31,35 @@ interface IConfig { /** * Writes a new app wide value + * @param string $appName the appName that we want to store the value under * @param string $key the key of the value, under which will be saved * @param string $value the value that should be stored */ - public function setAppValue($key, $value, $appName=null); + public function setAppValue($appName, $key, $value); /** * Looks up an app wide defined value + * @param string $appName the appName that we stored the value under * @param string $key the key of the value, under which it was saved * @return string the saved value */ - public function getAppValue($key, $appName=null); + public function getAppValue($appName, $key); /** - * Shortcut for setting a user defined value + * Set a user defined value + * @param string $userId the userId of the user that we want to store the value under + * @param string $appName the appName that we want to store the value under * @param string $key the key under which the value is being stored * @param string $value the value that you want to store - * @param string $userId the userId of the user that we want to store the value under, defaults to the current one */ - public function setUserValue($key, $value, $userId=null); + public function setUserValue($userId, $appName, $key, $value); /** * Shortcut for getting a user defined value + * @param string $userId the userId of the user that we want to store the value under + * @param string $appName the appName that we stored the value under * @param string $key the key under which the value is being stored - * @param string $userId the userId of the user that we want to store the value under, defaults to the current one */ - public function getUserValue($key, $userId=null); + public function getUserValue($userId, $appName, $key); } diff --git a/lib/public/idbconnection.php b/lib/public/idbconnection.php index 67dd7ccfc3..c741a0f061 100644 --- a/lib/public/idbconnection.php +++ b/lib/public/idbconnection.php @@ -50,16 +50,19 @@ interface IDBConnection { /** * @brief Start a transaction + * @return bool TRUE on success or FALSE on failure */ public function beginTransaction(); /** * @brief Commit the database changes done during a transaction that is in progress + * @return bool TRUE on success or FALSE on failure */ public function commit(); /** * @brief Rollback the database changes done during a transaction that is in progress + * @return bool TRUE on success or FALSE on failure */ public function rollBack(); diff --git a/lib/user/session.php b/lib/user/session.php index 9a6c669e93..98a24d5bb0 100644 --- a/lib/user/session.php +++ b/lib/user/session.php @@ -27,7 +27,7 @@ use OC\Hooks\Emitter; * * @package OC\User */ -class Session implements Emitter { +class Session implements Emitter, \OCP\IUserSession { /** * @var \OC\User\Manager $manager */