@@ -399,7 +399,7 @@ |
||
399 | 399 | 'content' => $content, |
400 | 400 | 'isApplicationValid' => $this->checkApplication($application) |
401 | 401 | ]); |
402 | - }elseif('attachments' === $formName){ |
|
402 | + } elseif('attachments' === $formName){ |
|
403 | 403 | $attachment = $uploadHandler->handleAttachmentUpload($postData['applicationId'], $_FILES['attachments']); |
404 | 404 | $basepath = $this->viewHelper->get('basepath'); |
405 | 405 | $content = $basepath($attachment->getUri()); |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $user = $this->auth->getUser(); |
86 | 86 | if($user instanceof AnonymousUser){ |
87 | 87 | $metadata->getPermissions()->grant($user, PermissionsInterface::PERMISSION_ALL); |
88 | - }else{ |
|
88 | + } else{ |
|
89 | 89 | $metadata->setUser($user); |
90 | 90 | $this->dm->persist($user); |
91 | 91 | $this->dm->flush(); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $qb = $this->queryBuilder; |
49 | 49 | $qb->skip($offset)->limit($itemCountPerPage); |
50 | 50 | return $qb->getQuery()->toArray(); |
51 | - }catch (\Exception $e){ |
|
51 | + } catch (\Exception $e){ |
|
52 | 52 | throw $e; |
53 | 53 | } |
54 | 54 | } |
@@ -147,7 +147,7 @@ |
||
147 | 147 | |
148 | 148 | if (is_string($image)) { |
149 | 149 | $file = $image; |
150 | - }else{ |
|
150 | + } else{ |
|
151 | 151 | $format = str_replace('image/', '', $data['type']); |
152 | 152 | $content = $image->get($format); |
153 | 153 | $file = '/tmp/php'.md5($content); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | return $image; |
81 | 81 | } |
82 | 82 | } |
83 | - }catch (\Exception $e){ |
|
83 | + } catch (\Exception $e){ |
|
84 | 84 | return null; |
85 | 85 | } |
86 | 86 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'content' => $content, |
139 | 139 | ) |
140 | 140 | ); |
141 | - }elseif($form) { |
|
141 | + } elseif($form) { |
|
142 | 142 | $postData = $form->getOption('use_post_array') ? $_POST : array(); |
143 | 143 | //@TODO: [ZF3] option use_files_array is false by default |
144 | 144 | //$filesData = $form->getOption('use_files_array') ? $_FILES : array(); |
@@ -173,8 +173,7 @@ discard block |
||
173 | 173 | 'content' => $content, |
174 | 174 | ) |
175 | 175 | ); |
176 | - } |
|
177 | - elseif ($postProfiles) { |
|
176 | + } elseif ($postProfiles) { |
|
178 | 177 | $formSocialProfiles->setData($this->params()->fromPost()); |
179 | 178 | |
180 | 179 | if ($formSocialProfiles->isValid()) { |
@@ -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; |