@@ -77,7 +77,7 @@ |
||
77 | 77 | $dbConn->selectDatabase('YAWIK'); |
78 | 78 | $dm = DocumentManager::create($dbConn,$config); |
79 | 79 | return $dm; |
80 | - }catch (\Exception $e){ |
|
80 | + } catch (\Exception $e){ |
|
81 | 81 | throw new \Exception("Can't create document manager: {$e->getMessage()}"); |
82 | 82 | } |
83 | 83 | } |
@@ -109,8 +109,7 @@ discard block |
||
109 | 109 | if('image' === $formId){ |
110 | 110 | // handles image upload |
111 | 111 | $uploadHandler->handleImageUpload($cv, $_FILES['image']); |
112 | - } |
|
113 | - elseif('attachments' === $formId){ |
|
112 | + } elseif('attachments' === $formId){ |
|
114 | 113 | // handles attachment upload |
115 | 114 | $attachment = $uploadHandler->handleAttachmentUpload($cv, $_FILES['attachments']); |
116 | 115 | $content = $viewHelperManager->get('basepath') |
@@ -119,8 +118,7 @@ discard block |
||
119 | 118 | 'valid' => true, |
120 | 119 | 'content' => $content, |
121 | 120 | ]); |
122 | - } |
|
123 | - else{ |
|
121 | + } else{ |
|
124 | 122 | if (!$form->isValid()) { |
125 | 123 | return new JsonModel([ |
126 | 124 | 'valid' => false, |
@@ -78,7 +78,7 @@ |
||
78 | 78 | '_entity' => OrganizationImage::class |
79 | 79 | ]; |
80 | 80 | } |
81 | - }else{ |
|
81 | + } else{ |
|
82 | 82 | $image['$ref'] = 'organizations.images.files'; |
83 | 83 | $image['_entity'] = OrganizationImage::class; |
84 | 84 | $newImages[] = $image; |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $progressBar->advance(); |
75 | 75 | try{ |
76 | 76 | $this->processFile($current['_id']); |
77 | - }catch (\Exception $exception){ |
|
77 | + } catch (\Exception $exception){ |
|
78 | 78 | $progressBar->finish(); |
79 | 79 | throw new MigrationException($exception->getMessage()); |
80 | 80 | } |
@@ -115,7 +115,7 @@ |
||
115 | 115 | foreach($this->processors as $processor){ |
116 | 116 | try{ |
117 | 117 | $cStat = $processor->process(); |
118 | - }catch (\Exception $exception){ |
|
118 | + } catch (\Exception $exception){ |
|
119 | 119 | $cStat = false; |
120 | 120 | } |
121 | 121 | if(false === $cStat){ |
@@ -86,7 +86,7 @@ |
||
86 | 86 | |
87 | 87 | if($user instanceof AnonymousUser){ |
88 | 88 | $metadata->getPermissions()->grant($user, PermissionsInterface::PERMISSION_ALL); |
89 | - }else{ |
|
89 | + } else{ |
|
90 | 90 | $this->dm->getUnitOfWork()->registerManaged($user, $user->getId(), []); |
91 | 91 | |
92 | 92 | $metadata->setUser($user); |