@@ -31,52 +31,52 @@ |
||
31 | 31 | */ |
32 | 32 | class PasswordUpdatedEvent extends Event { |
33 | 33 | |
34 | - /** @var IUser */ |
|
35 | - private $user; |
|
34 | + /** @var IUser */ |
|
35 | + private $user; |
|
36 | 36 | |
37 | - /** @var string */ |
|
38 | - private $password; |
|
37 | + /** @var string */ |
|
38 | + private $password; |
|
39 | 39 | |
40 | - /** @var string|null */ |
|
41 | - private $recoveryPassword; |
|
40 | + /** @var string|null */ |
|
41 | + private $recoveryPassword; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param IUser $user |
|
45 | - * @param string $password |
|
46 | - * @param string|null $recoveryPassword |
|
47 | - * @since 18.0.0 |
|
48 | - */ |
|
49 | - public function __construct(IUser $user, |
|
50 | - string $password, |
|
51 | - string $recoveryPassword = null) { |
|
52 | - parent::__construct(); |
|
53 | - $this->user = $user; |
|
54 | - $this->password = $password; |
|
55 | - $this->recoveryPassword = $recoveryPassword; |
|
56 | - } |
|
43 | + /** |
|
44 | + * @param IUser $user |
|
45 | + * @param string $password |
|
46 | + * @param string|null $recoveryPassword |
|
47 | + * @since 18.0.0 |
|
48 | + */ |
|
49 | + public function __construct(IUser $user, |
|
50 | + string $password, |
|
51 | + string $recoveryPassword = null) { |
|
52 | + parent::__construct(); |
|
53 | + $this->user = $user; |
|
54 | + $this->password = $password; |
|
55 | + $this->recoveryPassword = $recoveryPassword; |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * @return IUser |
|
60 | - * @since 18.0.0 |
|
61 | - */ |
|
62 | - public function getUser(): IUser { |
|
63 | - return $this->user; |
|
64 | - } |
|
58 | + /** |
|
59 | + * @return IUser |
|
60 | + * @since 18.0.0 |
|
61 | + */ |
|
62 | + public function getUser(): IUser { |
|
63 | + return $this->user; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * @return string |
|
68 | - * @since 18.0.0 |
|
69 | - */ |
|
70 | - public function getPassword(): string { |
|
71 | - return $this->password; |
|
72 | - } |
|
66 | + /** |
|
67 | + * @return string |
|
68 | + * @since 18.0.0 |
|
69 | + */ |
|
70 | + public function getPassword(): string { |
|
71 | + return $this->password; |
|
72 | + } |
|
73 | 73 | |
74 | - /** |
|
75 | - * @return string|null |
|
76 | - * @since 18.0.0 |
|
77 | - */ |
|
78 | - public function getRecoveryPassword(): ?string { |
|
79 | - return $this->recoveryPassword; |
|
80 | - } |
|
74 | + /** |
|
75 | + * @return string|null |
|
76 | + * @since 18.0.0 |
|
77 | + */ |
|
78 | + public function getRecoveryPassword(): ?string { |
|
79 | + return $this->recoveryPassword; |
|
80 | + } |
|
81 | 81 | |
82 | 82 | } |
@@ -33,34 +33,34 @@ |
||
33 | 33 | */ |
34 | 34 | class BeforeUserCreatedEvent extends Event { |
35 | 35 | |
36 | - /** @var string */ |
|
37 | - private $uid; |
|
36 | + /** @var string */ |
|
37 | + private $uid; |
|
38 | 38 | |
39 | - /** @var string */ |
|
40 | - private $password; |
|
39 | + /** @var string */ |
|
40 | + private $password; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @since 18.0.0 |
|
44 | - */ |
|
45 | - public function __construct(string $uid, |
|
46 | - string $password) { |
|
47 | - parent::__construct(); |
|
48 | - $this->uid = $uid; |
|
49 | - $this->password = $password; |
|
50 | - } |
|
42 | + /** |
|
43 | + * @since 18.0.0 |
|
44 | + */ |
|
45 | + public function __construct(string $uid, |
|
46 | + string $password) { |
|
47 | + parent::__construct(); |
|
48 | + $this->uid = $uid; |
|
49 | + $this->password = $password; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @since 18.0.0 |
|
54 | - */ |
|
55 | - public function getUid(): string { |
|
56 | - return $this->uid; |
|
57 | - } |
|
52 | + /** |
|
53 | + * @since 18.0.0 |
|
54 | + */ |
|
55 | + public function getUid(): string { |
|
56 | + return $this->uid; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * @since 18.0.0 |
|
61 | - */ |
|
62 | - public function getPassword(): string { |
|
63 | - return $this->password; |
|
64 | - } |
|
59 | + /** |
|
60 | + * @since 18.0.0 |
|
61 | + */ |
|
62 | + public function getPassword(): string { |
|
63 | + return $this->password; |
|
64 | + } |
|
65 | 65 | |
66 | 66 | } |
@@ -32,54 +32,54 @@ |
||
32 | 32 | */ |
33 | 33 | interface IToken { |
34 | 34 | |
35 | - /** |
|
36 | - * Extend the token validity time |
|
37 | - * |
|
38 | - * @since 18.0.0 |
|
39 | - */ |
|
40 | - public function extend(): void; |
|
35 | + /** |
|
36 | + * Extend the token validity time |
|
37 | + * |
|
38 | + * @since 18.0.0 |
|
39 | + */ |
|
40 | + public function extend(): void; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Invalidate the token |
|
44 | - * |
|
45 | - * @since 18.0.0 |
|
46 | - */ |
|
47 | - public function invalidate(): void; |
|
42 | + /** |
|
43 | + * Invalidate the token |
|
44 | + * |
|
45 | + * @since 18.0.0 |
|
46 | + */ |
|
47 | + public function invalidate(): void; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Check if the token has already been used |
|
51 | - * |
|
52 | - * @since 18.0.0 |
|
53 | - * @return bool |
|
54 | - */ |
|
55 | - public function hasBeenAccessed(): bool; |
|
49 | + /** |
|
50 | + * Check if the token has already been used |
|
51 | + * |
|
52 | + * @since 18.0.0 |
|
53 | + * @return bool |
|
54 | + */ |
|
55 | + public function hasBeenAccessed(): bool; |
|
56 | 56 | |
57 | - /** |
|
58 | - * Change to the user scope of the token |
|
59 | - * |
|
60 | - * @since 18.0.0 |
|
61 | - */ |
|
62 | - public function useTokenScope(): void; |
|
57 | + /** |
|
58 | + * Change to the user scope of the token |
|
59 | + * |
|
60 | + * @since 18.0.0 |
|
61 | + */ |
|
62 | + public function useTokenScope(): void; |
|
63 | 63 | |
64 | - /** |
|
65 | - * Get the file that is related to the token |
|
66 | - * |
|
67 | - * @since 18.0.0 |
|
68 | - * @return File |
|
69 | - * @throws NotFoundException |
|
70 | - */ |
|
71 | - public function getFile(): File; |
|
64 | + /** |
|
65 | + * Get the file that is related to the token |
|
66 | + * |
|
67 | + * @since 18.0.0 |
|
68 | + * @return File |
|
69 | + * @throws NotFoundException |
|
70 | + */ |
|
71 | + public function getFile(): File; |
|
72 | 72 | |
73 | - /** |
|
74 | - * @since 18.0.0 |
|
75 | - * @return string |
|
76 | - */ |
|
77 | - public function getEditor(): string; |
|
73 | + /** |
|
74 | + * @since 18.0.0 |
|
75 | + * @return string |
|
76 | + */ |
|
77 | + public function getEditor(): string; |
|
78 | 78 | |
79 | - /** |
|
80 | - * @since 18.0.0 |
|
81 | - * @return string |
|
82 | - */ |
|
83 | - public function getUser(): string; |
|
79 | + /** |
|
80 | + * @since 18.0.0 |
|
81 | + * @return string |
|
82 | + */ |
|
83 | + public function getUser(): string; |
|
84 | 84 | |
85 | 85 | } |
@@ -34,35 +34,35 @@ |
||
34 | 34 | */ |
35 | 35 | class BeforeUserAddedEvent extends Event { |
36 | 36 | |
37 | - /** @var IGroup */ |
|
38 | - private $group; |
|
37 | + /** @var IGroup */ |
|
38 | + private $group; |
|
39 | 39 | |
40 | - /*** @var IUser */ |
|
41 | - private $user; |
|
40 | + /*** @var IUser */ |
|
41 | + private $user; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @since 18.0.0 |
|
45 | - */ |
|
46 | - public function __construct(IGroup $group, IUser $user) { |
|
47 | - parent::__construct(); |
|
48 | - $this->group = $group; |
|
49 | - $this->user = $user; |
|
50 | - } |
|
43 | + /** |
|
44 | + * @since 18.0.0 |
|
45 | + */ |
|
46 | + public function __construct(IGroup $group, IUser $user) { |
|
47 | + parent::__construct(); |
|
48 | + $this->group = $group; |
|
49 | + $this->user = $user; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return IGroup |
|
54 | - * @since 18.0.0 |
|
55 | - */ |
|
56 | - public function getGroup(): IGroup { |
|
57 | - return $this->group; |
|
58 | - } |
|
52 | + /** |
|
53 | + * @return IGroup |
|
54 | + * @since 18.0.0 |
|
55 | + */ |
|
56 | + public function getGroup(): IGroup { |
|
57 | + return $this->group; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return IUser |
|
62 | - * @since 18.0.0 |
|
63 | - */ |
|
64 | - public function getUser(): IUser { |
|
65 | - return $this->user; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return IUser |
|
62 | + * @since 18.0.0 |
|
63 | + */ |
|
64 | + public function getUser(): IUser { |
|
65 | + return $this->user; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | } |
@@ -34,35 +34,35 @@ |
||
34 | 34 | */ |
35 | 35 | class UserRemovedEvent extends Event { |
36 | 36 | |
37 | - /** @var IGroup */ |
|
38 | - private $group; |
|
37 | + /** @var IGroup */ |
|
38 | + private $group; |
|
39 | 39 | |
40 | - /*** @var IUser */ |
|
41 | - private $user; |
|
40 | + /*** @var IUser */ |
|
41 | + private $user; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @since 18.0.0 |
|
45 | - */ |
|
46 | - public function __construct(IGroup $group, IUser $user) { |
|
47 | - parent::__construct(); |
|
48 | - $this->group = $group; |
|
49 | - $this->user = $user; |
|
50 | - } |
|
43 | + /** |
|
44 | + * @since 18.0.0 |
|
45 | + */ |
|
46 | + public function __construct(IGroup $group, IUser $user) { |
|
47 | + parent::__construct(); |
|
48 | + $this->group = $group; |
|
49 | + $this->user = $user; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return IGroup |
|
54 | - * @since 18.0.0 |
|
55 | - */ |
|
56 | - public function getGroup(): IGroup { |
|
57 | - return $this->group; |
|
58 | - } |
|
52 | + /** |
|
53 | + * @return IGroup |
|
54 | + * @since 18.0.0 |
|
55 | + */ |
|
56 | + public function getGroup(): IGroup { |
|
57 | + return $this->group; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return IUser |
|
62 | - * @since 18.0.0 |
|
63 | - */ |
|
64 | - public function getUser(): IUser { |
|
65 | - return $this->user; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return IUser |
|
62 | + * @since 18.0.0 |
|
63 | + */ |
|
64 | + public function getUser(): IUser { |
|
65 | + return $this->user; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | } |
@@ -34,35 +34,35 @@ |
||
34 | 34 | */ |
35 | 35 | class UserAddedEvent extends Event { |
36 | 36 | |
37 | - /** @var IGroup */ |
|
38 | - private $group; |
|
37 | + /** @var IGroup */ |
|
38 | + private $group; |
|
39 | 39 | |
40 | - /*** @var IUser */ |
|
41 | - private $user; |
|
40 | + /*** @var IUser */ |
|
41 | + private $user; |
|
42 | 42 | |
43 | - /** |
|
44 | - * @since 18.0.0 |
|
45 | - */ |
|
46 | - public function __construct(IGroup $group, IUser $user) { |
|
47 | - parent::__construct(); |
|
48 | - $this->group = $group; |
|
49 | - $this->user = $user; |
|
50 | - } |
|
43 | + /** |
|
44 | + * @since 18.0.0 |
|
45 | + */ |
|
46 | + public function __construct(IGroup $group, IUser $user) { |
|
47 | + parent::__construct(); |
|
48 | + $this->group = $group; |
|
49 | + $this->user = $user; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return IGroup |
|
54 | - * @since 18.0.0 |
|
55 | - */ |
|
56 | - public function getGroup(): IGroup { |
|
57 | - return $this->group; |
|
58 | - } |
|
52 | + /** |
|
53 | + * @return IGroup |
|
54 | + * @since 18.0.0 |
|
55 | + */ |
|
56 | + public function getGroup(): IGroup { |
|
57 | + return $this->group; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return IUser |
|
62 | - * @since 18.0.0 |
|
63 | - */ |
|
64 | - public function getUser(): IUser { |
|
65 | - return $this->user; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return IUser |
|
62 | + * @since 18.0.0 |
|
63 | + */ |
|
64 | + public function getUser(): IUser { |
|
65 | + return $this->user; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | } |
@@ -29,48 +29,48 @@ |
||
29 | 29 | |
30 | 30 | class Token implements IToken { |
31 | 31 | |
32 | - /** @var Manager */ |
|
33 | - private $manager; |
|
34 | - private $data; |
|
32 | + /** @var Manager */ |
|
33 | + private $manager; |
|
34 | + private $data; |
|
35 | 35 | |
36 | - public function __construct(Manager $manager, $data) { |
|
37 | - $this->manager = $manager; |
|
38 | - $this->data = $data; |
|
39 | - } |
|
36 | + public function __construct(Manager $manager, $data) { |
|
37 | + $this->manager = $manager; |
|
38 | + $this->data = $data; |
|
39 | + } |
|
40 | 40 | |
41 | - public function extend(): void { |
|
42 | - $this->manager->refreshToken($this->data['token']); |
|
43 | - } |
|
41 | + public function extend(): void { |
|
42 | + $this->manager->refreshToken($this->data['token']); |
|
43 | + } |
|
44 | 44 | |
45 | - public function invalidate(): void { |
|
46 | - $this->manager->invalidateToken($this->data['token']); |
|
47 | - } |
|
45 | + public function invalidate(): void { |
|
46 | + $this->manager->invalidateToken($this->data['token']); |
|
47 | + } |
|
48 | 48 | |
49 | - public function getFile(): File { |
|
50 | - if ($this->data['share_id'] !== null) { |
|
51 | - return $this->manager->getShareForToken($this->data['share_id']); |
|
52 | - } |
|
53 | - return $this->manager->getFileForToken($this->data['user_id'], $this->data['file_id'], $this->data['file_path']); |
|
54 | - } |
|
49 | + public function getFile(): File { |
|
50 | + if ($this->data['share_id'] !== null) { |
|
51 | + return $this->manager->getShareForToken($this->data['share_id']); |
|
52 | + } |
|
53 | + return $this->manager->getFileForToken($this->data['user_id'], $this->data['file_id'], $this->data['file_path']); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getToken(): string { |
|
57 | - return $this->data['token']; |
|
58 | - } |
|
56 | + public function getToken(): string { |
|
57 | + return $this->data['token']; |
|
58 | + } |
|
59 | 59 | |
60 | - public function useTokenScope(): void { |
|
61 | - $this->manager->invokeTokenScope($this->data['user_id']); |
|
62 | - } |
|
60 | + public function useTokenScope(): void { |
|
61 | + $this->manager->invokeTokenScope($this->data['user_id']); |
|
62 | + } |
|
63 | 63 | |
64 | - public function hasBeenAccessed(): bool { |
|
65 | - return (bool) $this->data['accessed']; |
|
66 | - } |
|
64 | + public function hasBeenAccessed(): bool { |
|
65 | + return (bool) $this->data['accessed']; |
|
66 | + } |
|
67 | 67 | |
68 | - public function getEditor(): string { |
|
69 | - return $this->data['editor_id']; |
|
70 | - } |
|
68 | + public function getEditor(): string { |
|
69 | + return $this->data['editor_id']; |
|
70 | + } |
|
71 | 71 | |
72 | - public function getUser(): string { |
|
73 | - return $this->data['user_id']; |
|
74 | - } |
|
72 | + public function getUser(): string { |
|
73 | + return $this->data['user_id']; |
|
74 | + } |
|
75 | 75 | |
76 | 76 | } |
@@ -27,5 +27,5 @@ |
||
27 | 27 | * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher |
28 | 28 | */ |
29 | 29 | abstract class BasicEmitter implements Emitter { |
30 | - use EmitterTrait; |
|
30 | + use EmitterTrait; |
|
31 | 31 | } |
@@ -36,12 +36,12 @@ |
||
36 | 36 | * @since 18.0.0 |
37 | 37 | */ |
38 | 38 | interface IFileCheck extends IEntityCheck { |
39 | - /** |
|
40 | - * @param IStorage $storage |
|
41 | - * @param string $path |
|
42 | - * @param bool $isDir |
|
43 | - * @since 18.0.0 |
|
44 | - */ |
|
45 | - public function setFileInfo(IStorage $storage, string $path, bool $isDir = false): void; |
|
39 | + /** |
|
40 | + * @param IStorage $storage |
|
41 | + * @param string $path |
|
42 | + * @param bool $isDir |
|
43 | + * @since 18.0.0 |
|
44 | + */ |
|
45 | + public function setFileInfo(IStorage $storage, string $path, bool $isDir = false): void; |
|
46 | 46 | |
47 | 47 | } |