@@ -16,8 +16,8 @@ |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function afterController($controller, $methodName, Response $response) { |
| 19 | - if($response instanceof JSONResponse){ |
|
| 20 | - if(isset($this->request->server['HTTP_ORIGIN'])) { |
|
| 19 | + if ($response instanceof JSONResponse) { |
|
| 20 | + if (isset($this->request->server['HTTP_ORIGIN'])) { |
|
| 21 | 21 | $response->addHeader('Access-Control-Allow-Origin', $this->request->server['HTTP_ORIGIN']); |
| 22 | 22 | } |
| 23 | 23 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function __construct($AppName, |
| 24 | 24 | IRequest $request, |
| 25 | 25 | $UserId, |
| 26 | - FileService $fileService){ |
|
| 26 | + FileService $fileService) { |
|
| 27 | 27 | parent::__construct( |
| 28 | 28 | $AppName, |
| 29 | 29 | $request, |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | return new JSONResponse($this->fileService->deleteFile($file_id, $this->userId)); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - public function updateFile($file_id, $file_data, $filename){ |
|
| 69 | - try{ |
|
| 68 | + public function updateFile($file_id, $file_data, $filename) { |
|
| 69 | + try { |
|
| 70 | 70 | $file = $this->fileService->getFile($file_id, $this->userId); |
| 71 | - } catch (\Exception $doesNotExistException){ |
|
| 71 | + } catch (\Exception $doesNotExistException) { |
|
| 72 | 72 | |
| 73 | 73 | } |
| 74 | - if($file){ |
|
| 75 | - if($file_data) { |
|
| 74 | + if ($file) { |
|
| 75 | + if ($file_data) { |
|
| 76 | 76 | $file->setFileData($file_data); |
| 77 | 77 | } |
| 78 | - if($filename) { |
|
| 78 | + if ($filename) { |
|
| 79 | 79 | $file->setFilename($filename); |
| 80 | 80 | } |
| 81 | - if($filename || $file_data){ |
|
| 81 | + if ($filename || $file_data) { |
|
| 82 | 82 | new JSONResponse($this->fileService->updateFile($file)); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | private $userId; |
| 23 | 23 | |
| 24 | - public function __construct($AppName, IRequest $request, $UserId){ |
|
| 24 | + public function __construct($AppName, IRequest $request, $UserId) { |
|
| 25 | 25 | parent::__construct($AppName, $request); |
| 26 | 26 | $this->userId = $UserId; |
| 27 | 27 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function index() { |
| 40 | 40 | $params = ['user' => $this->userId]; |
| 41 | - return new TemplateResponse('passman', 'main', $params); // templates/main.php |
|
| 41 | + return new TemplateResponse('passman', 'main', $params); // templates/main.php |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @NoAdminRequired |
| 47 | 47 | * @NoCSRFRequired |
| 48 | 48 | */ |
| 49 | - public function bookmarklet($url='',$title='') { |
|
| 49 | + public function bookmarklet($url = '', $title = '') { |
|
| 50 | 50 | $params = array('url' => $url, 'title' => $title); |
| 51 | 51 | return new TemplateResponse('passman', 'bookmarklet', $params); |
| 52 | 52 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | |
| 41 | -class DeleteVaultRequest extends Entity implements \JsonSerializable{ |
|
| 41 | +class DeleteVaultRequest extends Entity implements \JsonSerializable { |
|
| 42 | 42 | |
| 43 | 43 | use EntityJSONSerializer; |
| 44 | 44 | |
@@ -181,7 +181,7 @@ |
||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | |
| 184 | - private function parseLinkElement($htmlHead, $pageUrlInfo, $base_href){ |
|
| 184 | + private function parseLinkElement($htmlHead, $pageUrlInfo, $base_href) { |
|
| 185 | 185 | if (preg_match('#<\s*link[^>]*(rel=(["\'])[^>\2]*icon[^>\2]*\2)[^>]*>#i', $htmlHead, $matches)) { |
| 186 | 186 | $link_tag = $matches[0]; |
| 187 | 187 | $this->debugInfo['link_tag'] = $link_tag; |
@@ -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'), |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | if ($data !== false) { |
| 83 | - $version = (string)$data->version; |
|
| 83 | + $version = (string) $data->version; |
|
| 84 | 84 | } else { |
| 85 | 85 | libxml_clear_errors(); |
| 86 | 86 | } |
@@ -267,7 +267,7 @@ |
||
| 267 | 267 | 'apps' => array(self::FILTER_PASSMAN => |
| 268 | 268 | array( |
| 269 | 269 | 'id' => 'passman', |
| 270 | - 'name' => (string)$l->t('Passwords'), |
|
| 270 | + 'name' => (string) $l->t('Passwords'), |
|
| 271 | 271 | 'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_PASSMAN]), |
| 272 | 272 | ), |
| 273 | 273 | ), |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // Deal with known subjects |
| 53 | 53 | case 'credential_expired': |
| 54 | 54 | $notification->setParsedSubject( |
| 55 | - (string)$l->t('Your credential "%s" expired, click here to update the credential.', $notification->getSubjectParameters()) |
|
| 55 | + (string) $l->t('Your credential "%s" expired, click here to update the credential.', $notification->getSubjectParameters()) |
|
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | 58 | // Deal with the actions for a known subject |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | switch ($action->getLabel()) { |
| 61 | 61 | case 'remind': |
| 62 | 62 | $action->setParsedLabel( |
| 63 | - (string)$l->t('Remind me later') |
|
| 63 | + (string) $l->t('Remind me later') |
|
| 64 | 64 | ); |
| 65 | 65 | break; |
| 66 | 66 | |
| 67 | 67 | case 'ignore': |
| 68 | 68 | $action->setParsedLabel( |
| 69 | - (string)$l->t('Ignore') |
|
| 69 | + (string) $l->t('Ignore') |
|
| 70 | 70 | ); |
| 71 | 71 | break; |
| 72 | 72 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | case 'credential_shared': |
| 80 | 80 | $notification->setParsedSubject( |
| 81 | - (string)$l->t('%s shared "%s" with you. Click here to accept', $notification->getSubjectParameters()) |
|
| 81 | + (string) $l->t('%s shared "%s" with you. Click here to accept', $notification->getSubjectParameters()) |
|
| 82 | 82 | ); |
| 83 | 83 | |
| 84 | 84 | // Deal with the actions for a known subject |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | switch ($action->getLabel()) { |
| 87 | 87 | case 'decline': |
| 88 | 88 | $action->setParsedLabel( |
| 89 | - (string)$l->t('Decline') |
|
| 89 | + (string) $l->t('Decline') |
|
| 90 | 90 | ); |
| 91 | 91 | break; |
| 92 | 92 | } |
@@ -97,13 +97,13 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | case 'credential_share_denied': |
| 99 | 99 | $notification->setParsedSubject( |
| 100 | - (string)$l->t('%s has declined your share request for "%s".', $notification->getSubjectParameters()) |
|
| 100 | + (string) $l->t('%s has declined your share request for "%s".', $notification->getSubjectParameters()) |
|
| 101 | 101 | ); |
| 102 | 102 | return $notification; |
| 103 | 103 | |
| 104 | 104 | case 'credential_share_accepted': |
| 105 | 105 | $notification->setParsedSubject( |
| 106 | - (string)$l->t('%s has accepted your share request for "%s".', $notification->getSubjectParameters()) |
|
| 106 | + (string) $l->t('%s has accepted your share request for "%s".', $notification->getSubjectParameters()) |
|
| 107 | 107 | ); |
| 108 | 108 | return $notification; |
| 109 | 109 | default: |