Completed
Push — master ( 915c9b...cca4af )
by Janis
15:20 queued 13:39
created
lib/Hooks/UserHooks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      * Registers the user hooks.
52 52
      */
53 53
     public function register() {
54
-        $postDelete = function ($user) {
54
+        $postDelete = function($user) {
55 55
             $this->logger->debug('Deleting all jobs for user "{user}" after user deletion (Hook).', [
56 56
                     'user' => $user->getUID(),
57 57
                     'app' => 'OCR'
Please login to merge, or discard this patch.
lib/Service/JobService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 foreach ($fileInfo as $fInfo) {
158 158
                     // Check Shared
159 159
                     $shared = $this->fileService->checkSharedWithInitiator($fInfo);
160
-                    if($shared && $replace) {
160
+                    if ($shared && $replace) {
161 161
                         throw new NotFoundException($this->l10n->t('Cannot replace shared files.'));
162 162
                     }
163 163
                     $target = $this->fileService->buildTarget($fInfo, $shared, $replace);
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
             $this->logger->debug('Check if files were processed by ocr and if so, put them to the right dirs.', ['app' => 'OCR']);
277 277
             $processed = $this->jobMapper->findAllProcessed($this->userId);
278 278
             foreach ($processed as $job) {
279
-                if ($this->fileUtil->fileExists($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf')) {
279
+                if ($this->fileUtil->fileExists($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf')) {
280 280
                     // Save the tmp file with newname
281 281
                     $this->pullResult($job);
282 282
                     $this->jobMapper->delete($job);
283
-                    $this->fileUtil->execRemove($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf');
283
+                    $this->fileUtil->execRemove($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf');
284 284
                 } else {
285 285
                     $job->setStatus(OcrConstants::STATUS_FAILED);
286 286
                     $job->setErrorLog('Temp file does not exist.');
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             $failed = $this->jobMapper->findAllFailed($this->userId);
305 305
             foreach ($failed as $job) {
306 306
                 // clean the tempfile
307
-                $this->fileUtil->execRemove($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf');
307
+                $this->fileUtil->execRemove($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf');
308 308
                 // set error displayed
309 309
                 $job->setErrorDisplayed(true);
310 310
                 $this->jobMapper->update($job);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         if ($job->getReplace()) {
330 330
             $this->view->unlink(str_replace($this->userId . '/files', '', $job->getSource()));
331 331
         }
332
-        $result = $this->view->file_put_contents($job->getTarget(), $this->fileUtil->getFileContents($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf'));
332
+        $result = $this->view->file_put_contents($job->getTarget(), $this->fileUtil->getFileContents($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf'));
333 333
         if (!$result) {
334 334
             throw new NotFoundException($this->l10n->t('OCR could not put processed file to the right target folder. If you selected the replace option, you can restore the file by using the trash bin.'));
335 335
         }
Please login to merge, or discard this patch.