Failed Conditions
Push — master ( 0d3cdf...d7033b )
by
unknown
08:24
created
lib/Service/ActivityService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@
 block discarded – undo
48 48
 	 * @param $type string
49 49
 	 * @return array
50 50
 	 */
51
-	public function add($subject,$subjectParams=array(),
52
-						$message='',$messageParams=array(),
53
-						$link='',$user=null,$type='') {
54
-		if($user) {
51
+	public function add($subject, $subjectParams = array(),
52
+						$message = '', $messageParams = array(),
53
+						$link = '', $user = null, $type = '') {
54
+		if ($user) {
55 55
 			$activity = $this->manager->generateEvent();
56 56
 			$activity->setType($type);
57 57
 			$activity->setApp('passman');
Please login to merge, or discard this patch.
controller/credentialcontroller.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,13 +163,13 @@
 block discarded – undo
163 163
 				$activity . '_self', array($label, $this->userId, $revision_created),
164 164
 				'', array(),
165 165
 				$link, $this->userId, Activity::TYPE_ITEM_ACTION);
166
-		} else if (($storedCredential->getDeleteTime() === 0) && (int)$delete_time > 0) {
166
+		} else if (($storedCredential->getDeleteTime() === 0) && (int) $delete_time > 0) {
167 167
 			$activity = 'item_deleted';
168 168
 			$this->activityService->add(
169 169
 				$activity . '_self', array($label, $this->userId),
170 170
 				'', array(),
171 171
 				$link, $this->userId, Activity::TYPE_ITEM_ACTION);
172
-		} else if (($storedCredential->getDeleteTime() > 0) && (int)$delete_time === 0) {
172
+		} else if (($storedCredential->getDeleteTime() > 0) && (int) $delete_time === 0) {
173 173
 			$activity = 'item_recovered';
174 174
 			$this->activityService->add(
175 175
 				$activity . '_self', array($label, $this->userId),
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
 	private $settings;
37 37
 
38 38
 	public function __construct($AppName,
39
-	                            IRequest $request,
39
+								IRequest $request,
40 40
 								$userId,
41
-		                        CredentialService $credentialService,
42
-		                        ActivityService $activityService,
43
-		                        CredentialRevisionService $credentialRevisionService,
44
-		                        ShareService $sharingService,
45
-		                        SettingsService $settings
41
+								CredentialService $credentialService,
42
+								ActivityService $activityService,
43
+								CredentialRevisionService $credentialRevisionService,
44
+								ShareService $sharingService,
45
+								SettingsService $settings
46 46
 
47 47
 	) {
48 48
 		parent::__construct(
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 	 * @NoCSRFRequired
66 66
 	 */
67 67
 	public function createCredential($changed, $created,
68
-	                                 $credential_id, $custom_fields, $delete_time,
69
-	                                 $description, $email, $expire_time, $favicon, $files, $guid,
70
-	                                 $hidden, $icon, $label, $otp, $password, $renew_interval,
71
-	                                 $tags, $url, $username, $vault_id, $compromised) {
68
+									 $credential_id, $custom_fields, $delete_time,
69
+									 $description, $email, $expire_time, $favicon, $files, $guid,
70
+									 $hidden, $icon, $label, $otp, $password, $renew_interval,
71
+									 $tags, $url, $username, $vault_id, $compromised) {
72 72
 		$credential = array(
73 73
 			'credential_id' => $credential_id,
74 74
 			'guid' => $guid,
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 	 * @NoCSRFRequired
122 122
 	 */
123 123
 	public function updateCredential($changed, $created,
124
-	                                 $credential_id, $custom_fields, $delete_time, $credential_guid,
125
-	                                 $description, $email, $expire_time, $icon, $files, $guid,
126
-	                                 $hidden, $label, $otp, $password, $renew_interval,
127
-	                                 $tags, $url, $username, $vault_id, $revision_created, $shared_key, $acl, $unshare_action, $set_share_key, $skip_revision, $compromised) {
124
+									 $credential_id, $custom_fields, $delete_time, $credential_guid,
125
+									 $description, $email, $expire_time, $icon, $files, $guid,
126
+									 $hidden, $label, $otp, $password, $renew_interval,
127
+									 $tags, $url, $username, $vault_id, $revision_created, $shared_key, $acl, $unshare_action, $set_share_key, $skip_revision, $compromised) {
128 128
 
129 129
 
130 130
 		$storedCredential = $this->credentialService->getCredentialByGUID($credential_guid);
Please login to merge, or discard this patch.
lib/Service/EncryptService.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,9 @@
 block discarded – undo
272 272
 	protected function unpad($data) {
273 273
 		$length = $this->getKeySize();
274 274
 		$last = ord($data[strlen($data) - 1]);
275
-		if ($last > $length) return false;
275
+		if ($last > $length) {
276
+			return false;
277
+		}
276 278
 		if (substr($data, -1 * $last) !== str_repeat(chr($last), $last)) {
277 279
 			return false;
278 280
 		}
Please login to merge, or discard this patch.
middleware/sharemiddleware.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 			$setting = (in_array($methodName, $publicMethods)) ? 'link_sharing_enabled' : 'user_sharing_enabled';
27 27
 			$sharing_enabled = ($this->settings->isEnabled($setting));
28 28
 
29
-			if(in_array($methodName, $user_pub_methods)){
29
+			if (in_array($methodName, $user_pub_methods)) {
30 30
 				$sharing_enabled = ($this->settings->isEnabled('link_sharing_enabled') || $this->settings->isEnabled('user_sharing_enabled'));
31 31
 			}
32 32
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 			$setting = (in_array($methodName, $publicMethods)) ? 'link_sharing_enabled' : 'user_sharing_enabled';
27 27
 			$sharing_enabled = ($this->settings->isEnabled($setting));
28 28
 
29
-			if(in_array($methodName, $user_pub_methods)){
29
+			if(in_array($methodName, $user_pub_methods)) {
30 30
 				$sharing_enabled = ($this->settings->isEnabled('link_sharing_enabled') || $this->settings->isEnabled('user_sharing_enabled'));
31 31
 			}
32 32
 
Please login to merge, or discard this patch.
middleware/apimiddleware.php 2 patches
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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 	}
17 17
 
18 18
 	public function afterController($controller, $methodName, Response $response) {
19
-		if($response instanceof JSONResponse){
19
+		if($response instanceof JSONResponse) {
20 20
 			if(isset($this->request->server['HTTP_ORIGIN'])) {
21 21
 				$response->addHeader('Access-Control-Allow-Origin', $this->request->server['HTTP_ORIGIN']);
22 22
 			}
Please login to merge, or discard this patch.
appinfo/routes.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -52,19 +52,19 @@
 block discarded – undo
52 52
 		//Sharing stuff
53 53
 		['name' => 'share#search', 'url' => '/api/v2/sharing/search', 'verb' => 'POST'],
54 54
 		['name' => 'share#getVaultsByUser', 'url' => '/api/v2/sharing/vaults/{user_id}', 'verb' => 'GET'],
55
-        ['name' => 'share#applyIntermediateShare', 'url' => '/api/v2/sharing/share', 'verb' => 'POST'],
56
-        ['name' => 'share#savePendingRequest', 'url' => '/api/v2/sharing/save', 'verb' => 'POST'],
57
-        ['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'GET'],
58
-        ['name' => 'share#deleteShareRequest', 'url' => '/api/v2/sharing/decline/{share_request_id}', 'verb' => 'DELETE'],
59
-        ['name' => 'share#getVaultItems', 'url' => '/api/v2/sharing/vault/{vault_guid}/get', 'verb' => 'GET'],
60
-        ['name' => 'share#createPublicShare', 'url' => '/api/v2/sharing/public', 'verb' => 'POST'],
61
-        ['name' => 'share#getPublicCredentialData', 'url' => '/api/v2/sharing/credential/{credential_guid}/public', 'verb' => 'GET'],
62
-        ['name' => 'share#unshareCredential', 'url' => '/api/v2/sharing/credential/{item_guid}', 'verb' => 'DELETE'],
63
-        ['name' => 'share#unshareCredentialFromUser', 'url' => '/api/v2/sharing/credential/{item_guid}/{user_id}', 'verb' => 'DELETE'],
64
-        ['name' => 'share#getRevisions', 'url' => '/api/v2/sharing/credential/{item_guid}/revisions', 'verb' => 'GET'],
65
-        ['name' => 'share#getItemAcl', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'GET'],
66
-        ['name' => 'share#getFile', 'url' => '/api/v2/sharing/credential/{item_guid}/file/{file_guid}', 'verb' => 'GET'],
67
-        ['name' => 'share#updateSharedCredentialACL', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'PATCH'],
55
+		['name' => 'share#applyIntermediateShare', 'url' => '/api/v2/sharing/share', 'verb' => 'POST'],
56
+		['name' => 'share#savePendingRequest', 'url' => '/api/v2/sharing/save', 'verb' => 'POST'],
57
+		['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'GET'],
58
+		['name' => 'share#deleteShareRequest', 'url' => '/api/v2/sharing/decline/{share_request_id}', 'verb' => 'DELETE'],
59
+		['name' => 'share#getVaultItems', 'url' => '/api/v2/sharing/vault/{vault_guid}/get', 'verb' => 'GET'],
60
+		['name' => 'share#createPublicShare', 'url' => '/api/v2/sharing/public', 'verb' => 'POST'],
61
+		['name' => 'share#getPublicCredentialData', 'url' => '/api/v2/sharing/credential/{credential_guid}/public', 'verb' => 'GET'],
62
+		['name' => 'share#unshareCredential', 'url' => '/api/v2/sharing/credential/{item_guid}', 'verb' => 'DELETE'],
63
+		['name' => 'share#unshareCredentialFromUser', 'url' => '/api/v2/sharing/credential/{item_guid}/{user_id}', 'verb' => 'DELETE'],
64
+		['name' => 'share#getRevisions', 'url' => '/api/v2/sharing/credential/{item_guid}/revisions', 'verb' => 'GET'],
65
+		['name' => 'share#getItemAcl', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'GET'],
66
+		['name' => 'share#getFile', 'url' => '/api/v2/sharing/credential/{item_guid}/file/{file_guid}', 'verb' => 'GET'],
67
+		['name' => 'share#updateSharedCredentialACL', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'PATCH'],
68 68
 		['name' => 'internal#getAppVersion', 'url' => '/api/v2/version', 'verb' => 'GET'],
69 69
 
70 70
 		//Settings
Please login to merge, or discard this patch.
lib/Db/DeleteVaultRequest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Service/IconService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
controller/translationcontroller.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 			'password.r' => $this->trans->t('Repeat password'),
141 141
 			'add.tag' => $this->trans->t('Add tag'),
142 142
 			'pick.icon' => $this->trans->t('Pick an icon'),
143
-            'pick.icon.search' => $this->trans->t('Search icons'),
144
-            'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'),
143
+			'pick.icon.search' => $this->trans->t('Search icons'),
144
+			'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'),
145 145
 			'use.icon' => $this->trans->t('Use this icon'),
146 146
 			'use.icon.delete' => $this->trans->t('Delete current icon'),
147 147
 			'use.icon.refresh' => $this->trans->t('Get icon from page'),
@@ -351,15 +351,15 @@  discard block
 block discarded – undo
351 351
 			'decline' => $this->trans->t('Decline'),
352 352
 			'session.time.left' => $this->trans->t('You have {{session_time}} left before logout.'),
353 353
 			'vault.locked' => $this->trans->t('Your vault has been locked for {{time}} because of {{tries}} failed attempts!'),
354
-            'vault.hint.hello' => $this->trans->t('Hello there!'),
355
-            'vault.hint.hello.add' => $this->trans->t('It does not seem that you have any passwords. Do you want to add one?'),
356
-            'vault.hint.list.nogood' => $this->trans->t('You don\'t have good credentials'),
357
-            'vault.hint.list.nomedium' => $this->trans->t('You don\'t have medium credentials'),
358
-            'vault.hint.list.nobad' => $this->trans->t('You don\'t have bad credentials'),
359
-            'vault.hint.list.noexpired' => $this->trans->t('You don\'t have expired credentials'),
360
-            'vault.hint.list.nodeleted' => $this->trans->t('You don\'t have deleted credentials'),
361
-            'vault.hint.list.notags' => $this->trans->t('There are no credentials with your selected tags'),
362
-            'vault.hint.list.nosearch' => $this->trans->t('There are no credentials matching'),
354
+			'vault.hint.hello' => $this->trans->t('Hello there!'),
355
+			'vault.hint.hello.add' => $this->trans->t('It does not seem that you have any passwords. Do you want to add one?'),
356
+			'vault.hint.list.nogood' => $this->trans->t('You don\'t have good credentials'),
357
+			'vault.hint.list.nomedium' => $this->trans->t('You don\'t have medium credentials'),
358
+			'vault.hint.list.nobad' => $this->trans->t('You don\'t have bad credentials'),
359
+			'vault.hint.list.noexpired' => $this->trans->t('You don\'t have expired credentials'),
360
+			'vault.hint.list.nodeleted' => $this->trans->t('You don\'t have deleted credentials'),
361
+			'vault.hint.list.notags' => $this->trans->t('There are no credentials with your selected tags'),
362
+			'vault.hint.list.nosearch' => $this->trans->t('There are no credentials matching'),
363 363
 
364 364
 
365 365
 			// templates/views/vaults.html
@@ -405,15 +405,15 @@  discard block
 block discarded – undo
405 405
 			'deleted.credentials' => $this->trans->t('Deleted credentials'),
406 406
 			'logout' => $this->trans->t('Logout'),
407 407
 			'donate' => $this->trans->t('Donate'),
408
-            'navigation.show.all' => $this->trans->t('Show All'),
409
-            'navigation.tags' => $this->trans->t('Tags'),
410
-            'navigation.tags.search' => $this->trans->t('Search Tags'),
411
-            'navigation.strength.good' => $this->trans->t('Good Strength'),
412
-            'navigation.strength.medium' => $this->trans->t('Medium Strength'),
413
-            'navigation.strength.bad' => $this->trans->t('Bad Strength'),
414
-            'navigation.expired' => $this->trans->t('Expired'),
415
-            'navigation.advanced.filter' => $this->trans->t('Filter Tags'),
416
-            'navigation.advanced.checkbox' => $this->trans->t('Simple Navigation'),
408
+			'navigation.show.all' => $this->trans->t('Show All'),
409
+			'navigation.tags' => $this->trans->t('Tags'),
410
+			'navigation.tags.search' => $this->trans->t('Search Tags'),
411
+			'navigation.strength.good' => $this->trans->t('Good Strength'),
412
+			'navigation.strength.medium' => $this->trans->t('Medium Strength'),
413
+			'navigation.strength.bad' => $this->trans->t('Bad Strength'),
414
+			'navigation.expired' => $this->trans->t('Expired'),
415
+			'navigation.advanced.filter' => $this->trans->t('Filter Tags'),
416
+			'navigation.advanced.checkbox' => $this->trans->t('Simple Navigation'),
417 417
 
418 418
 
419 419
 			// templates/public_share.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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'),
Please login to merge, or discard this patch.