| @@ -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']); | |
| 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']); | |
| 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 | } |