Update to adhere to the coding guidelines.
This commit is contained in:
parent
6ba23912a7
commit
442a2e074c
|
@ -17,10 +17,10 @@ use OCP\IServerContainer;
|
|||
class Server extends SimpleContainer implements IServerContainer {
|
||||
|
||||
function __construct() {
|
||||
$this->registerService('ContactsManager', function($c){
|
||||
$this->registerService('ContactsManager', function($c) {
|
||||
return new ContactsManager();
|
||||
});
|
||||
$this->registerService('Request', function($c){
|
||||
$this->registerService('Request', function($c) {
|
||||
$params = array();
|
||||
|
||||
// we json decode the body only in case of content type json
|
||||
|
@ -45,10 +45,10 @@ class Server extends SimpleContainer implements IServerContainer {
|
|||
)
|
||||
);
|
||||
});
|
||||
$this->registerService('PreviewManager', function($c){
|
||||
$this->registerService('PreviewManager', function($c) {
|
||||
return new PreviewManager();
|
||||
});
|
||||
$this->registerService('RootFolder', function($c){
|
||||
$this->registerService('RootFolder', function($c) {
|
||||
// TODO: get user and user manager from container as well
|
||||
$user = \OC_User::getUser();
|
||||
$user = \OC_User::getManager()->get($user);
|
||||
|
@ -83,8 +83,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
|||
*
|
||||
* @return \OCP\IRequest|null
|
||||
*/
|
||||
function getRequest()
|
||||
{
|
||||
function getRequest() {
|
||||
return $this->query('Request');
|
||||
}
|
||||
|
||||
|
@ -93,8 +92,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
|||
*
|
||||
* @return \OCP\IPreview
|
||||
*/
|
||||
function getPreviewManager()
|
||||
{
|
||||
function getPreviewManager() {
|
||||
return $this->query('PreviewManager');
|
||||
}
|
||||
|
||||
|
@ -103,8 +101,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
|||
*
|
||||
* @return \OCP\Files\Folder
|
||||
*/
|
||||
function getRootFolder()
|
||||
{
|
||||
function getRootFolder() {
|
||||
return $this->query('RootFolder');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue