@@ -41,7 +41,7 @@ |
||
41 | 41 | public function getLanguageStrings() { |
42 | 42 | $translations = array( |
43 | 43 | // js/app/controllers/bookmarklet.js |
44 | - 'generating.sharing.keys' => $this->trans->t('Generating sharing keys ( %s / 2)','%step'), |
|
44 | + 'generating.sharing.keys' => $this->trans->t('Generating sharing keys ( %s / 2)', '%step'), |
|
45 | 45 | 'invalid.vault.key' => $this->trans->t('Incorrect vault password!'), |
46 | 46 | 'password.do.not.match' => $this->trans->t('Passwords do not match'), |
47 | 47 | 'general' => $this->trans->t('General'), |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | * @NoCSRFRequired |
58 | 58 | */ |
59 | 59 | public function getIcon($base64Url, $credentialId) { |
60 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
60 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
61 | 61 | |
62 | - if($credentialId) { |
|
62 | + if ($credentialId) { |
|
63 | 63 | try { |
64 | 64 | $credential = $this->credentialService->getCredentialById($credentialId, $this->userId); |
65 | 65 | $credential = $credential->jsonSerialize(); |
66 | - } catch (DoesNotExistException $e){ |
|
66 | + } catch (DoesNotExistException $e) { |
|
67 | 67 | // Credential is not found, continue |
68 | 68 | $credential = false; |
69 | 69 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ]; |
90 | 90 | $credential['icon'] = json_encode($iconData); |
91 | 91 | try { |
92 | - if($credential) { |
|
92 | + if ($credential) { |
|
93 | 93 | $this->credentialService->updateCredential($credential); |
94 | 94 | } |
95 | 95 | } catch (DriverException $exception) { |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | $pack = explode('/', $path[1])[2]; |
131 | 131 | $mime = mime_content_type($iconPath); |
132 | 132 | //print_r($path); |
133 | - if($mime !== 'directory') { |
|
133 | + if ($mime !== 'directory') { |
|
134 | 134 | $icon = []; |
135 | 135 | $icon['mimetype'] = mime_content_type($iconPath); |
136 | 136 | $icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]); |
137 | 137 | $icon['pack'] = $pack; |
138 | - if(!isset($icons[$pack])){ |
|
138 | + if (!isset($icons[$pack])) { |
|
139 | 139 | $icons[$pack] = []; |
140 | 140 | } |
141 | 141 | $icons[$pack][] = $icon; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | //fetch the proper credentialelement, the returned element from createCredential is not usable in the frontend. |
110 | 110 | $credentials = $this->credentialService->getCredentialsByVaultId($vault_id, $this->userId); |
111 | 111 | foreach ($credentials as &$value) { |
112 | - if($value->getGuid() == $credential->getGuid()){ |
|
112 | + if ($value->getGuid() == $credential->getGuid()) { |
|
113 | 113 | return new JSONResponse($value); |
114 | 114 | } |
115 | 115 | } |
@@ -185,13 +185,13 @@ discard block |
||
185 | 185 | $activity . '_self', array($label, $this->userId, $revision_created), |
186 | 186 | '', array(), |
187 | 187 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
188 | - } else if (($storedCredential->getDeleteTime() === 0) && (int)$delete_time > 0) { |
|
188 | + } else if (($storedCredential->getDeleteTime() === 0) && (int) $delete_time > 0) { |
|
189 | 189 | $activity = 'item_deleted'; |
190 | 190 | $this->activityService->add( |
191 | 191 | $activity . '_self', array($label, $this->userId), |
192 | 192 | '', array(), |
193 | 193 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
194 | - } else if (($storedCredential->getDeleteTime() > 0) && (int)$delete_time === 0) { |
|
194 | + } else if (($storedCredential->getDeleteTime() > 0) && (int) $delete_time === 0) { |
|
195 | 195 | $activity = 'item_recovered'; |
196 | 196 | $this->activityService->add( |
197 | 197 | $activity . '_self', array($label, $this->userId), |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | //fetch the proper credentialelement, the returned element from createCredential is not usable in the frontend. |
274 | 274 | $credentials = $this->credentialService->getCredentialsByVaultId($vault_id, $this->userId); |
275 | 275 | foreach ($credentials as &$value) { |
276 | - if($value->getGuid() == $credential->getGuid()){ |
|
276 | + if ($value->getGuid() == $credential->getGuid()) { |
|
277 | 277 | return new JSONResponse($value); |
278 | 278 | } |
279 | 279 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $this->sharingService->unshareCredential($credential->getGuid()); |
315 | 315 | foreach ($this->credentialRevisionService->getRevisions($credential->getId()) as $revision) { |
316 | 316 | $id = $revision['revision_id']; |
317 | - if(isset($id)){ |
|
317 | + if (isset($id)) { |
|
318 | 318 | $this->credentialRevisionService->deleteRevision($id, $this->userId); |
319 | 319 | } |
320 | 320 | } |