summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/Apps.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-07-12 08:38:56 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-07-12 08:53:12 +0200
commitf9e0e3d972afec07e6b8339cd17ab705e3a5dbc4 (patch)
treec3ab18ddac98130c2ffb13a7a11b17ee41eced1a /apps/provisioning_api/lib/Apps.php
parente29835a702388488e285da22dd4eaff0dffef1fb (diff)
downloadnextcloud-server-f9e0e3d972afec07e6b8339cd17ab705e3a5dbc4.tar.gz
nextcloud-server-f9e0e3d972afec07e6b8339cd17ab705e3a5dbc4.zip
Fix Warnings Provisioning API
* OC_OCS_Result is deprecated * getMock is deprecated in phpunit 5.4
Diffstat (limited to 'apps/provisioning_api/lib/Apps.php')
-rw-r--r--apps/provisioning_api/lib/Apps.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/provisioning_api/lib/Apps.php b/apps/provisioning_api/lib/Apps.php
index 9c73d8e701c..c23591a684a 100644
--- a/apps/provisioning_api/lib/Apps.php
+++ b/apps/provisioning_api/lib/Apps.php
@@ -26,7 +26,6 @@
namespace OCA\Provisioning_API;
use OC\OCSClient;
-use \OC_OCS_Result;
use \OC_App;
class Apps {
@@ -46,7 +45,7 @@ class Apps {
/**
* @param array $parameters
- * @return OC_OCS_Result
+ * @return \OC\OCS\Result
*/
public function getApps($parameters) {
$apps = OC_App::listAllApps(false, true, $this->ocsClient);
@@ -58,55 +57,55 @@ class Apps {
if($filter){
switch($filter){
case 'enabled':
- return new OC_OCS_Result(array('apps' => \OC_App::getEnabledApps()));
+ return new \OC\OCS\Result(array('apps' => \OC_App::getEnabledApps()));
break;
case 'disabled':
$enabled = OC_App::getEnabledApps();
- return new OC_OCS_Result(array('apps' => array_diff($list, $enabled)));
+ return new \OC\OCS\Result(array('apps' => array_diff($list, $enabled)));
break;
default:
// Invalid filter variable
- return new OC_OCS_Result(null, 101);
+ return new \OC\OCS\Result(null, 101);
break;
}
} else {
- return new OC_OCS_Result(array('apps' => $list));
+ return new \OC\OCS\Result(array('apps' => $list));
}
}
/**
* @param array $parameters
- * @return OC_OCS_Result
+ * @return \OC\OCS\Result
*/
public function getAppInfo($parameters) {
$app = $parameters['appid'];
$info = \OCP\App::getAppInfo($app);
if(!is_null($info)) {
- return new OC_OCS_Result(OC_App::getAppInfo($app));
+ return new \OC\OCS\Result(OC_App::getAppInfo($app));
} else {
- return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found');
+ return new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found');
}
}
/**
* @param array $parameters
- * @return OC_OCS_Result
+ * @return \OC\OCS\Result
*/
public function enable($parameters) {
$app = $parameters['appid'];
$this->appManager->enableApp($app);
- return new OC_OCS_Result(null, 100);
+ return new \OC\OCS\Result(null, 100);
}
/**
* @param array $parameters
- * @return OC_OCS_Result
+ * @return \OC\OCS\Result
*/
public function disable($parameters) {
$app = $parameters['appid'];
$this->appManager->disableApp($app);
- return new OC_OCS_Result(null, 100);
+ return new \OC\OCS\Result(null, 100);
}
}