| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | */ | 
| 37 | 37 | |
| 38 | 38 | |
| 39 | -class Vault extends Entity implements  \JsonSerializable{ | |
| 39 | +class Vault extends Entity implements  \JsonSerializable { | |
| 40 | 40 | |
| 41 | 41 | use EntityJSONSerializer; | 
| 42 | 42 | |
| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | */ | 
| 33 | 33 | |
| 34 | 34 | |
| 35 | -class File extends Entity implements  \JsonSerializable{ | |
| 35 | +class File extends Entity implements  \JsonSerializable { | |
| 36 | 36 | |
| 37 | 37 | use EntityJSONSerializer; | 
| 38 | 38 | |
| @@ -63,7 +63,7 @@ | ||
| 63 | 63 | */ | 
| 64 | 64 | |
| 65 | 65 | |
| 66 | -class Credential extends Entity implements  \JsonSerializable{ | |
| 66 | +class Credential extends Entity implements  \JsonSerializable { | |
| 67 | 67 | |
| 68 | 68 | use EntityJSONSerializer; | 
| 69 | 69 | |
| @@ -78,7 +78,7 @@ | ||
| 78 | 78 | ]; | 
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | -    function asACLJson(){ | |
| 81 | +    function asACLJson() { | |
| 82 | 82 | return [ | 
| 83 | 83 | 'item_id' => $this->getItemId(), | 
| 84 | 84 | 'item_guid' => $this->getItemGuid(), | 
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 |  trait EntityJSONSerializer { | 
| 13 | 13 |  	public function serializeFields($properties) { | 
| 14 | 14 | $result = []; | 
| 15 | -		foreach($properties as $property) { | |
| 15 | +		foreach ($properties as $property) { | |
| 16 | 16 | $result[$property] = $this->$property; | 
| 17 | 17 | } | 
| 18 | 18 | return $result; | 
| @@ -13,11 +13,11 @@ | ||
| 13 | 13 | use OCP\AppFramework\Db\Entity; | 
| 14 | 14 | |
| 15 | 15 |  class PermissionEntity extends Entity { | 
| 16 | - CONST READ = 0b00000001; | |
| 17 | - CONST WRITE = 0b00000010; | |
| 18 | - CONST FILES = 0b00000100; | |
| 16 | + CONST READ = 0b00000001; | |
| 17 | + CONST WRITE = 0b00000010; | |
| 18 | + CONST FILES = 0b00000100; | |
| 19 | 19 | CONST HISTORY = 0b00001000; | 
| 20 | - CONST OWNER = 0b10000000; | |
| 20 | + CONST OWNER = 0b10000000; | |
| 21 | 21 | |
| 22 | 22 | /** | 
| 23 | 23 | * Checks wether a user matches one or more permissions at once | 
| @@ -48,10 +48,10 @@ | ||
| 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'); | 
| @@ -163,13 +163,13 @@ | ||
| 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), | 
| @@ -26,7 +26,7 @@ | ||
| 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 | |