Completed
Push — master ( d13a6c...c719b2 )
by
unknown
01:59
created
controller/paperhivecontroller.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 * @NoAdminRequired
191 191
 	 *
192 192
 	 * @param string $bookID
193
-	 * @return string/boolean
193
+	 * @return string
194 194
 	 */
195 195
 	private function fetchDocument($bookID) {
196 196
 		$urlDocument = $this->paperhive_base_url . $this->paperhive_api_url . $bookID;
@@ -278,7 +278,6 @@  discard block
 block discarded – undo
278 278
 	 *
279 279
 	 * @NoAdminRequired
280 280
 	 *
281
-	 * @param string $bookID
282 281
 	 * @return DataResponse
283 282
 	 */
284 283
 	public function getPaperHiveDetails() {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 use OCP\IRequest;
34 34
 use OCP\Lock\LockedException;
35 35
 
36
-class PaperHiveController extends Controller{
36
+class PaperHiveController extends Controller {
37 37
 
38 38
 	/** @var IL10N */
39 39
 	private $l;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 			}
154 154
 
155 155
 		} catch (LockedException $e) {
156
-			$message = (string) $this->l->t('The file is locked.');
156
+			$message = (string)$this->l->t('The file is locked.');
157 157
 			return new DataResponse(['message' => $message], Http::STATUS_BAD_REQUEST);
158 158
 		} catch (ForbiddenException $e) {
159 159
 			return new DataResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		if (json_last_error() === JSON_ERROR_NONE && isset($paperHiveObject['title'])) {
237 237
 			$filename = $paperHiveObject['title'] . $this->paperhive_file_extension;
238 238
 
239
-			if($dir == '/') {
239
+			if ($dir == '/') {
240 240
 				$path = $dir . $filename;
241 241
 			} else {
242 242
 				$path = $dir . '/' . $filename;
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
 			try {
246 246
 				$exists = $this->view->file_exists($path);
247 247
 				if ($exists) {
248
-					$message = (string) $this->l->t('The file already exists.');
248
+					$message = (string)$this->l->t('The file already exists.');
249 249
 					return new DataResponse(['message' => $message], Http::STATUS_BAD_REQUEST);
250 250
 				}
251 251
 				$filecontents = iconv(mb_detect_encoding($paperHiveString), "UTF-8", $paperHiveString);
252 252
 				try {
253 253
 					$this->view->file_put_contents($path, $filecontents);
254 254
 				} catch (LockedException $e) {
255
-					$message = (string) $this->l->t('The file is locked.');
255
+					$message = (string)$this->l->t('The file is locked.');
256 256
 					return new DataResponse(['message' => $message], Http::STATUS_BAD_REQUEST);
257 257
 				} catch (ForbiddenException $e) {
258 258
 					return new DataResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
Please login to merge, or discard this patch.
appinfo/application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 		$container = $this->getContainer();
39 39
 		$server = $container->getServer();
40 40
 
41
-		$container->registerService('PaperHiveController', function (IAppContainer $c) use ($server) {
41
+		$container->registerService('PaperHiveController', function(IAppContainer $c) use ($server) {
42 42
 			$user = $server->getUserSession()->getUser();
43 43
 			if ($user) {
44 44
 				$uid = $user->getUID();
Please login to merge, or discard this patch.