Passed
Push — master ( e10226...a93d18 )
by Morris
20:00 queued 06:22
created
core/Controller/OCSController.php 1 patch
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -36,125 +36,125 @@
 block discarded – undo
36 36
 
37 37
 class OCSController extends \OCP\AppFramework\OCSController {
38 38
 
39
-	/** @var CapabilitiesManager */
40
-	private $capabilitiesManager;
41
-	/** @var IUserSession */
42
-	private $userSession;
43
-	/** @var IUserManager */
44
-	private $userManager;
45
-	/** @var Manager */
46
-	private $keyManager;
39
+    /** @var CapabilitiesManager */
40
+    private $capabilitiesManager;
41
+    /** @var IUserSession */
42
+    private $userSession;
43
+    /** @var IUserManager */
44
+    private $userManager;
45
+    /** @var Manager */
46
+    private $keyManager;
47 47
 
48
-	/**
49
-	 * OCSController constructor.
50
-	 *
51
-	 * @param string $appName
52
-	 * @param IRequest $request
53
-	 * @param CapabilitiesManager $capabilitiesManager
54
-	 * @param IUserSession $userSession
55
-	 * @param IUserManager $userManager
56
-	 * @param Manager $keyManager
57
-	 */
58
-	public function __construct($appName,
59
-								IRequest $request,
60
-								CapabilitiesManager $capabilitiesManager,
61
-								IUserSession $userSession,
62
-								IUserManager $userManager,
63
-								Manager $keyManager) {
64
-		parent::__construct($appName, $request);
65
-		$this->capabilitiesManager = $capabilitiesManager;
66
-		$this->userSession = $userSession;
67
-		$this->userManager = $userManager;
68
-		$this->keyManager = $keyManager;
69
-	}
48
+    /**
49
+     * OCSController constructor.
50
+     *
51
+     * @param string $appName
52
+     * @param IRequest $request
53
+     * @param CapabilitiesManager $capabilitiesManager
54
+     * @param IUserSession $userSession
55
+     * @param IUserManager $userManager
56
+     * @param Manager $keyManager
57
+     */
58
+    public function __construct($appName,
59
+                                IRequest $request,
60
+                                CapabilitiesManager $capabilitiesManager,
61
+                                IUserSession $userSession,
62
+                                IUserManager $userManager,
63
+                                Manager $keyManager) {
64
+        parent::__construct($appName, $request);
65
+        $this->capabilitiesManager = $capabilitiesManager;
66
+        $this->userSession = $userSession;
67
+        $this->userManager = $userManager;
68
+        $this->keyManager = $keyManager;
69
+    }
70 70
 
71
-	/**
72
-	 * @PublicPage
73
-	 *
74
-	 * @return DataResponse
75
-	 */
76
-	public function getConfig() {
77
-		$data = [
78
-			'version' => '1.7',
79
-			'website' => 'Nextcloud',
80
-			'host' => $this->request->getServerHost(),
81
-			'contact' => '',
82
-			'ssl' => 'false',
83
-		];
71
+    /**
72
+     * @PublicPage
73
+     *
74
+     * @return DataResponse
75
+     */
76
+    public function getConfig() {
77
+        $data = [
78
+            'version' => '1.7',
79
+            'website' => 'Nextcloud',
80
+            'host' => $this->request->getServerHost(),
81
+            'contact' => '',
82
+            'ssl' => 'false',
83
+        ];
84 84
 
85
-		return new DataResponse($data);
86
-	}
85
+        return new DataResponse($data);
86
+    }
87 87
 
88
-	/**
89
-	 * @PublicPage
90
-	 *
91
-	 * @return DataResponse
92
-	 */
93
-	public function getCapabilities() {
94
-		$result = [];
95
-		list($major, $minor, $micro) = \OCP\Util::getVersion();
96
-		$result['version'] = [
97
-			'major' => $major,
98
-			'minor' => $minor,
99
-			'micro' => $micro,
100
-			'string' => \OC_Util::getVersionString(),
101
-			'edition' => '',
102
-			'extendedSupport' => \OCP\Util::hasExtendedSupport()
103
-		];
88
+    /**
89
+     * @PublicPage
90
+     *
91
+     * @return DataResponse
92
+     */
93
+    public function getCapabilities() {
94
+        $result = [];
95
+        list($major, $minor, $micro) = \OCP\Util::getVersion();
96
+        $result['version'] = [
97
+            'major' => $major,
98
+            'minor' => $minor,
99
+            'micro' => $micro,
100
+            'string' => \OC_Util::getVersionString(),
101
+            'edition' => '',
102
+            'extendedSupport' => \OCP\Util::hasExtendedSupport()
103
+        ];
104 104
 
105
-		if ($this->userSession->isLoggedIn()) {
106
-			$result['capabilities'] = $this->capabilitiesManager->getCapabilities();
107
-		} else {
108
-			$result['capabilities'] = $this->capabilitiesManager->getCapabilities(true);
109
-		}
105
+        if ($this->userSession->isLoggedIn()) {
106
+            $result['capabilities'] = $this->capabilitiesManager->getCapabilities();
107
+        } else {
108
+            $result['capabilities'] = $this->capabilitiesManager->getCapabilities(true);
109
+        }
110 110
 
111
-		$response = new DataResponse($result);
112
-		$response->setETag(md5(json_encode($result)));
113
-		return $response;
114
-	}
111
+        $response = new DataResponse($result);
112
+        $response->setETag(md5(json_encode($result)));
113
+        return $response;
114
+    }
115 115
 
116
-	/**
117
-	 * @PublicPage
118
-	 * @BruteForceProtection(action=login)
119
-	 *
120
-	 * @param string $login
121
-	 * @param string $password
122
-	 * @return DataResponse
123
-	 */
124
-	public function personCheck($login = '', $password = '') {
125
-		if ($login !== '' && $password !== '') {
126
-			if ($this->userManager->checkPassword($login, $password)) {
127
-				return new DataResponse([
128
-					'person' => [
129
-						'personid' => $login
130
-					]
131
-				]);
132
-			}
116
+    /**
117
+     * @PublicPage
118
+     * @BruteForceProtection(action=login)
119
+     *
120
+     * @param string $login
121
+     * @param string $password
122
+     * @return DataResponse
123
+     */
124
+    public function personCheck($login = '', $password = '') {
125
+        if ($login !== '' && $password !== '') {
126
+            if ($this->userManager->checkPassword($login, $password)) {
127
+                return new DataResponse([
128
+                    'person' => [
129
+                        'personid' => $login
130
+                    ]
131
+                ]);
132
+            }
133 133
 
134
-			$response = new DataResponse([], 102);
135
-			$response->throttle();
136
-			return $response;
137
-		}
138
-		return new DataResponse([], 101);
139
-	}
134
+            $response = new DataResponse([], 102);
135
+            $response->throttle();
136
+            return $response;
137
+        }
138
+        return new DataResponse([], 101);
139
+    }
140 140
 
141
-	/**
142
-	 * @PublicPage
143
-	 *
144
-	 * @param string $cloudId
145
-	 * @return DataResponse
146
-	 */
147
-	public function getIdentityProof($cloudId) {
148
-		$userObject = $this->userManager->get($cloudId);
141
+    /**
142
+     * @PublicPage
143
+     *
144
+     * @param string $cloudId
145
+     * @return DataResponse
146
+     */
147
+    public function getIdentityProof($cloudId) {
148
+        $userObject = $this->userManager->get($cloudId);
149 149
 
150
-		if ($userObject !== null) {
151
-			$key = $this->keyManager->getKey($userObject);
152
-			$data = [
153
-				'public' => $key->getPublic(),
154
-			];
155
-			return new DataResponse($data);
156
-		}
150
+        if ($userObject !== null) {
151
+            $key = $this->keyManager->getKey($userObject);
152
+            $data = [
153
+                'public' => $key->getPublic(),
154
+            ];
155
+            return new DataResponse($data);
156
+        }
157 157
 
158
-		return new DataResponse(['User not found'], 404);
159
-	}
158
+        return new DataResponse(['User not found'], 404);
159
+    }
160 160
 }
Please login to merge, or discard this patch.