aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-24 14:13:40 +0200
committerLukas Reschke <lukas@owncloud.com>2014-10-24 14:13:40 +0200
commitb3a04840b54464457298807d6609d525d68d8953 (patch)
tree408d7c8103a788cbb7c714f64649be180f54ed4d /apps/files_encryption/lib
parent77b8e1543a697dbc5fad0bdbbc6bb6c271448066 (diff)
downloadnextcloud-server-b3a04840b54464457298807d6609d525d68d8953.tar.gz
nextcloud-server-b3a04840b54464457298807d6609d525d68d8953.zip
Add type hinting to functions
It's only reasonable to have proper type hinting here which might even help us to catch bugs.
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/helper.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 6f4eb4aaf3b..53c380ab2b3 100644
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -89,7 +89,7 @@ class Helper {
* @param string $password
* @return bool
*/
- public static function setupUser($util, $password) {
+ public static function setupUser(Util $util, $password) {
// Check files_encryption infrastructure is ready for action
if (!$util->ready()) {
@@ -333,7 +333,7 @@ class Helper {
* @param string $path
* @param \OC\Files\View $view
*/
- public static function mkdirr($path, $view) {
+ public static function mkdirr($path, \OC\Files\View $view) {
$dirname = \OC\Files\Filesystem::normalizePath(dirname($path));
$dirParts = explode('/', $dirname);
$dir = "";
@@ -348,8 +348,10 @@ class Helper {
/**
* redirect to a error page
* @param Session $session
+ * @param int|null $errorCode
+ * @throws \Exception
*/
- public static function redirectToErrorPage($session, $errorCode = null) {
+ public static function redirectToErrorPage(Session $session, $errorCode = null) {
if ($errorCode === null) {
$init = $session->getInitialized();
@@ -439,7 +441,7 @@ class Helper {
* @param \OC\Files\View $rootView root view, relative to data/
* @return array list of share key files, path relative to data/$user
*/
- public static function findShareKeys($filePath, $shareKeyPath, $rootView) {
+ public static function findShareKeys($filePath, $shareKeyPath, \OC\Files\View $rootView) {
$result = array();
$user = \OCP\User::getUser();