@@ -18,8 +18,8 @@ |
||
18 | 18 | * it's instantiated in there |
19 | 19 | */ |
20 | 20 | return [ |
21 | - 'routes' => [ |
|
21 | + 'routes' => [ |
|
22 | 22 | ['name' => 'ocr#process', 'url' => '/process', 'verb' => 'GET'], |
23 | 23 | ['name' => 'ocr#languages', 'url' => '/languages', 'verb' => 'GET'], |
24 | - ] |
|
24 | + ] |
|
25 | 25 | ]; |
26 | 26 | \ No newline at end of file |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | $this->service = $service; |
47 | 47 | } |
48 | 48 | |
49 | - /** |
|
50 | - * @NoAdminRequired |
|
51 | - * |
|
52 | - * @return Template |
|
53 | - */ |
|
49 | + /** |
|
50 | + * @NoAdminRequired |
|
51 | + * |
|
52 | + * @return Template |
|
53 | + */ |
|
54 | 54 | public function displayPanel() { |
55 | 55 | $tmpl = new Template('ocr', 'settings-personal'); |
56 | 56 | return $tmpl; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getAll() { |
65 | 65 | return $this->handleNotFound(function () { |
66 | - return $this->service->getAllForPersonal($this->userId); |
|
66 | + return $this->service->getAllForPersonal($this->userId); |
|
67 | 67 | }); |
68 | 68 | } |
69 | 69 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @return \OCP\AppFramework\Http\DataResponse |
63 | 63 | */ |
64 | 64 | public function getAll() { |
65 | - return $this->handleNotFound(function () { |
|
65 | + return $this->handleNotFound(function() { |
|
66 | 66 | return $this->service->getAllForPersonal($this->userId); |
67 | 67 | }); |
68 | 68 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @return \OCP\AppFramework\Http\DataResponse |
74 | 74 | */ |
75 | 75 | public function deleteStatus($id) { |
76 | - return $this->handleNotFound(function () use ($id) { |
|
76 | + return $this->handleNotFound(function() use ($id) { |
|
77 | 77 | return $this->service->deleteStatus($id, $this->userId); |
78 | 78 | }); |
79 | 79 | } |
@@ -41,16 +41,16 @@ |
||
41 | 41 | return $this->findEntity($sql, [$id]); |
42 | 42 | } |
43 | 43 | |
44 | - /** |
|
45 | - * Finds all user specific status entities |
|
46 | - * |
|
47 | - * @param $userId |
|
48 | - * @return OcrStatus[] |
|
49 | - */ |
|
50 | - public function findAll($userId) { |
|
51 | - $sql = 'SELECT * FROM *PREFIX*ocr_status WHERE user_id = ?'; |
|
52 | - return $this->findEntities($sql, [$userId]); |
|
53 | - } |
|
44 | + /** |
|
45 | + * Finds all user specific status entities |
|
46 | + * |
|
47 | + * @param $userId |
|
48 | + * @return OcrStatus[] |
|
49 | + */ |
|
50 | + public function findAll($userId) { |
|
51 | + $sql = 'SELECT * FROM *PREFIX*ocr_status WHERE user_id = ?'; |
|
52 | + return $this->findEntities($sql, [$userId]); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Finds all status PROCESSED entities for a given userid |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
75 | - * TODO: in the future this function could be used to give an admin information |
|
75 | + * TODO: in the future this function could be used to give an admin information |
|
76 | 76 | * Counts the messages in the message queue. |
77 | - * |
|
77 | + * |
|
78 | 78 | * @return mixed |
79 | 79 | */ |
80 | 80 | public function countMessages() { |
@@ -87,13 +87,13 @@ discard block |
||
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | - /** |
|
91 | - * TODO: in the future this function could be used to give an admin information |
|
92 | - * Counts the at this point processed files |
|
93 | - * |
|
94 | - * @return mixed |
|
95 | - */ |
|
96 | - public function countActiveProcesses() { |
|
90 | + /** |
|
91 | + * TODO: in the future this function could be used to give an admin information |
|
92 | + * Counts the at this point processed files |
|
93 | + * |
|
94 | + * @return mixed |
|
95 | + */ |
|
96 | + public function countActiveProcesses() { |
|
97 | 97 | try { |
98 | 98 | $stats = msg_stat_queue($this->statusqueue); |
99 | 99 | $this->logger->debug('Current active processing count: ' . json_encode($stats['msg_qnum']), ['app' => 'ocr']); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | public function run(IOutput $output) { |
46 | 46 | $output->startProgress(1); |
47 | - if ($this->connection->tableExists('ocr_status')){ |
|
47 | + if ($this->connection->tableExists('ocr_status')) { |
|
48 | 48 | $this->connection->dropTable('ocr_status'); |
49 | 49 | } |
50 | 50 | $output->advance(1, "Drop old database table: ocr_status"); |
@@ -128,7 +128,7 @@ |
||
128 | 128 | * Registers the Personal Settings Page for deletion of status objects and such things. |
129 | 129 | * @codeCoverageIgnore |
130 | 130 | */ |
131 | - public function registerPersonal(){ |
|
131 | + public function registerPersonal() { |
|
132 | 132 | \OCP\App::registerPersonal($this->getContainer()->getAppName(), 'personal'); |
133 | 133 | } |
134 | 134 |