aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-11-27 18:19:14 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-08 22:29:43 +0100
commita9e411e076ddbb5525ad44db4cad9efe2efd0fd2 (patch)
tree9cf256b1bc48a8fd93f4b78d5dde45012971f3ae
parent719008836d5254c6fa3975c5044d1c6a811bc124 (diff)
downloadnextcloud-server-a9e411e076ddbb5525ad44db4cad9efe2efd0fd2.tar.gz
nextcloud-server-a9e411e076ddbb5525ad44db4cad9efe2efd0fd2.zip
migrate \OC\AllConfig to \OCP\IConfig
-rw-r--r--lib/private/httphelper.php8
-rw-r--r--lib/private/user/manager.php7
-rw-r--r--lib/private/user/user.php7
-rw-r--r--tests/lib/app/infoparser.php2
-rw-r--r--tests/lib/httphelper.php4
-rw-r--r--tests/lib/user/user.php3
6 files changed, 17 insertions, 14 deletions
diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php
index dfc1bcf47cd..846825dee8d 100644
--- a/lib/private/httphelper.php
+++ b/lib/private/httphelper.php
@@ -8,16 +8,18 @@
namespace OC;
+use \OCP\IConfig;
+
class HTTPHelper {
const USER_AGENT = 'ownCloud Server Crawler';
- /** @var \OC\AllConfig */
+ /** @var \OCP\IConfig */
private $config;
/**
- * @param \OC\AllConfig $config
+ * @param \OCP\IConfig $config
*/
- public function __construct(AllConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
}
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php
index 2403f45aa2f..4fa3711e3b8 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/user/manager.php
@@ -11,6 +11,7 @@ namespace OC\User;
use OC\Hooks\PublicEmitter;
use OCP\IUserManager;
+use OCP\IConfig;
/**
* Class Manager
@@ -37,14 +38,14 @@ class Manager extends PublicEmitter implements IUserManager {
private $cachedUsers = array();
/**
- * @var \OC\AllConfig $config
+ * @var \OCP\IConfig $config
*/
private $config;
/**
- * @param \OC\AllConfig $config
+ * @param \OCP\IConfig $config
*/
- public function __construct($config = null) {
+ public function __construct(IConfig $config = null) {
$this->config = $config;
$cachedUsers = &$this->cachedUsers;
$this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) {
diff --git a/lib/private/user/user.php b/lib/private/user/user.php
index ad85337f628..fb66f893c61 100644
--- a/lib/private/user/user.php
+++ b/lib/private/user/user.php
@@ -11,6 +11,7 @@ namespace OC\User;
use OC\Hooks\Emitter;
use OCP\IUser;
+use OCP\IConfig;
class User implements IUser {
/**
@@ -49,7 +50,7 @@ class User implements IUser {
private $lastLogin;
/**
- * @var \OC\AllConfig $config
+ * @var \OCP\IConfig $config
*/
private $config;
@@ -57,9 +58,9 @@ class User implements IUser {
* @param string $uid
* @param \OC_User_Interface $backend
* @param \OC\Hooks\Emitter $emitter
- * @param \OC\AllConfig $config
+ * @param \OCP\IConfig $config
*/
- public function __construct($uid, $backend, $emitter = null, $config = null) {
+ public function __construct($uid, $backend, $emitter = null, IConfig $config = null) {
$this->uid = $uid;
$this->backend = $backend;
$this->emitter = $emitter;
diff --git a/tests/lib/app/infoparser.php b/tests/lib/app/infoparser.php
index 13c0b51e117..e291b616e8b 100644
--- a/tests/lib/app/infoparser.php
+++ b/tests/lib/app/infoparser.php
@@ -19,7 +19,7 @@ class InfoParser extends \PHPUnit_Framework_TestCase {
private $parser;
public function setUp() {
- $config = $this->getMockBuilder('\OC\AllConfig')
+ $config = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()->getMock();
$httpHelper = $this->getMockBuilder('\OC\HTTPHelper')
->setConstructorArgs(array($config))
diff --git a/tests/lib/httphelper.php b/tests/lib/httphelper.php
index eb58508f158..1cc4232ab4b 100644
--- a/tests/lib/httphelper.php
+++ b/tests/lib/httphelper.php
@@ -8,7 +8,7 @@
class TestHTTPHelper extends \Test\TestCase {
- /** @var \OC\AllConfig*/
+ /** @var \OCP\IConfig*/
private $config;
/** @var \OC\HTTPHelper */
private $httpHelperMock;
@@ -16,7 +16,7 @@ class TestHTTPHelper extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- $this->config = $this->getMockBuilder('\OC\AllConfig')
+ $this->config = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()->getMock();
$this->httpHelperMock = $this->getMockBuilder('\OC\HTTPHelper')
->setConstructorArgs(array($this->config))
diff --git a/tests/lib/user/user.php b/tests/lib/user/user.php
index 85ade9ccaf1..a940d6eb627 100644
--- a/tests/lib/user/user.php
+++ b/tests/lib/user/user.php
@@ -9,7 +9,6 @@
namespace Test\User;
-use OC\AllConfig;
use OC\Hooks\PublicEmitter;
class User extends \Test\TestCase {
@@ -228,7 +227,7 @@ class User extends \Test\TestCase {
->method('implementsActions')
->will($this->returnValue(false));
- $allConfig = $this->getMockBuilder('\OC\AllConfig')
+ $allConfig = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()
->getMock();
$allConfig->expects($this->any())