Completed
Push — master ( 2503bc...1a9778 )
by Sander
03:07
created
lib/Service/VaultService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 * @param $vault_id
93 93
 	 * @param $user_id
94 94
 	 */
95
-	public function setLastAccess($vault_id, $user_id){
95
+	public function setLastAccess($vault_id, $user_id) {
96 96
 		return $this->vaultMapper->setLastAccess($vault_id, $user_id);
97 97
 	}
98 98
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 * @param $privateKey
103 103
 	 * @param $publicKey
104 104
 	 */
105
-	public function updateSharingKeys($vault_id, $privateKey, $publicKey){
105
+	public function updateSharingKeys($vault_id, $privateKey, $publicKey) {
106 106
 		return $this->vaultMapper->updateSharingKeys($vault_id, $privateKey, $publicKey);
107 107
 	}
108 108
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 	 * @param string $vault_guid
112 112
 	 * @param string $user_id
113 113
 	 */
114
-	public function deleteVault($vault_guid, $user_id){
114
+	public function deleteVault($vault_guid, $user_id) {
115 115
 		$vault = $this->getByGuid($vault_guid, $user_id);
116
-		if($vault instanceof Vault) {
116
+		if ($vault instanceof Vault) {
117 117
 			$this->vaultMapper->deleteVault($vault);
118 118
 		}
119 119
 	}
Please login to merge, or discard this patch.
middleware/apimiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
controller/filecontroller.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
controller/pagecontroller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.