@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -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(), |
@@ -62,8 +62,7 @@ discard block |
||
| 62 | 62 | * which is a value of any type other than a resource. |
| 63 | 63 | * @since 5.4.0 |
| 64 | 64 | */ |
| 65 | - function jsonSerialize() |
|
| 66 | - { |
|
| 65 | + function jsonSerialize() { |
|
| 67 | 66 | return [ |
| 68 | 67 | 'req_id' => $this->getId(), |
| 69 | 68 | 'item_id' => $this->getItemId(), |
@@ -78,7 +77,7 @@ discard block |
||
| 78 | 77 | ]; |
| 79 | 78 | } |
| 80 | 79 | |
| 81 | - function asACLJson(){ |
|
| 80 | + function asACLJson() { |
|
| 82 | 81 | return [ |
| 83 | 82 | 'item_id' => $this->getItemId(), |
| 84 | 83 | '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 |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | * @method string getSharedKey() |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | -class SharingACL extends PermissionEntity implements \JsonSerializable |
|
| 39 | -{ |
|
| 38 | +class SharingACL extends PermissionEntity implements \JsonSerializable { |
|
| 40 | 39 | |
| 41 | 40 | protected |
| 42 | 41 | $itemId, |
@@ -67,8 +66,7 @@ discard block |
||
| 67 | 66 | * which is a value of any type other than a resource. |
| 68 | 67 | * @since 5.4.0 |
| 69 | 68 | */ |
| 70 | - function jsonSerialize() |
|
| 71 | - { |
|
| 69 | + function jsonSerialize() { |
|
| 72 | 70 | return [ |
| 73 | 71 | 'acl_id' => $this->getId(), |
| 74 | 72 | 'item_id' => $this->getItemId(), |
@@ -21,7 +21,7 @@ |
||
| 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 | } |
@@ -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 | } |
@@ -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'); |