@@ -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,7 +57,7 @@ discard block |
||
57 | 57 | * @NoCSRFRequired |
58 | 58 | */ |
59 | 59 | public function getSingleIcon($base64Url) { |
60 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
60 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
61 | 61 | if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
62 | 62 | $url = "http://" . $url; |
63 | 63 | } |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | $icon = new IconService($url); |
67 | 67 | |
68 | 68 | if ($icon->icoExists) { |
69 | - $icon_json['type']= $icon->icoType; |
|
70 | - $icon_json['content']= base64_encode($icon->icoData); |
|
69 | + $icon_json['type'] = $icon->icoType; |
|
70 | + $icon_json['content'] = base64_encode($icon->icoData); |
|
71 | 71 | return new JSONResponse($icon_json); |
72 | 72 | } |
73 | 73 | |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | * @NoCSRFRequired |
80 | 80 | */ |
81 | 81 | public function getIcon($base64Url, $credentialId) { |
82 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
82 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
83 | 83 | |
84 | - if($credentialId) { |
|
84 | + if ($credentialId) { |
|
85 | 85 | try { |
86 | 86 | $credential = $this->credentialService->getCredentialById($credentialId, $this->userId); |
87 | 87 | $credential = $credential->jsonSerialize(); |
88 | - } catch (DoesNotExistException $e){ |
|
88 | + } catch (DoesNotExistException $e) { |
|
89 | 89 | // Credential is not found, continue |
90 | 90 | $credential = false; |
91 | 91 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ]; |
112 | 112 | $credential['icon'] = json_encode($iconData); |
113 | 113 | try { |
114 | - if($credential) { |
|
114 | + if ($credential) { |
|
115 | 115 | $this->credentialService->updateCredential($credential); |
116 | 116 | } |
117 | 117 | } catch (DriverException $exception) { |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | $pack = explode('/', $path[1])[2]; |
153 | 153 | $mime = mime_content_type($iconPath); |
154 | 154 | //print_r($path); |
155 | - if($mime !== 'directory') { |
|
155 | + if ($mime !== 'directory') { |
|
156 | 156 | $icon = []; |
157 | 157 | $icon['mimetype'] = mime_content_type($iconPath); |
158 | 158 | $icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]); |
159 | 159 | $icon['pack'] = $pack; |
160 | - if(!isset($icons[$pack])){ |
|
160 | + if (!isset($icons[$pack])) { |
|
161 | 161 | $icons[$pack] = []; |
162 | 162 | } |
163 | 163 | $icons[$pack][] = $icon; |
@@ -49,16 +49,16 @@ |
||
49 | 49 | |
50 | 50 | public function expireCredentials() { |
51 | 51 | $expired_credentials = $this->credentialService->getExpiredCredentials($this->utils->getTime()); |
52 | - foreach($expired_credentials as $credential){ |
|
52 | + foreach ($expired_credentials as $credential) { |
|
53 | 53 | $link = ''; // @TODO create direct link to credential |
54 | 54 | |
55 | 55 | $sql = 'SELECT count(*) as `rows` from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?'; |
56 | 56 | $id = $credential->getId(); |
57 | 57 | $result = $this->db->executeQuery($sql, array($id)); |
58 | - $this->logger->debug($credential->getLabel() .' is expired, checking notifications!', array('app' => 'passman')); |
|
58 | + $this->logger->debug($credential->getLabel() . ' is expired, checking notifications!', array('app' => 'passman')); |
|
59 | 59 | $notifications = intval($result->fetch()['rows']); |
60 | - if($notifications === 0) { |
|
61 | - $this->logger->debug($credential->getLabel() .' is expired, adding notification!', array('app' => 'passman')); |
|
60 | + if ($notifications === 0) { |
|
61 | + $this->logger->debug($credential->getLabel() . ' is expired, adding notification!', array('app' => 'passman')); |
|
62 | 62 | $this->activityService->add( |
63 | 63 | Activity::SUBJECT_ITEM_EXPIRED, array($credential->getLabel(), $credential->getUserId()), |
64 | 64 | '', array(), |