Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVinicius Reis <vinicius.reis@nextcloud.com>2022-07-18 19:06:42 +0300
committerVinicius Reis <vinicius.reis@nextcloud.com>2022-07-18 22:47:41 +0300
commit3d58268f8ca78b0e1cad901173e749ba9d97e8c7 (patch)
tree78c7a22d0a402d7d8cf0c076c81b91dcb6181b04 /lib
parentf8b122502316a02581185add11bc8b9941097ba2 (diff)
🩹 (#2719): fix interface typing
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/TextFile.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/TextFile.php b/lib/TextFile.php
index b562fd885..87420fcae 100644
--- a/lib/TextFile.php
+++ b/lib/TextFile.php
@@ -42,23 +42,23 @@ class TextFile implements ISimpleFile {
$this->encodingService = $encodingService;
}
- public function getName() {
+ public function getName(): string {
return $this->file->getName();
}
- public function getSize() {
+ public function getSize(): int {
return $this->file->getSize();
}
- public function getETag() {
+ public function getETag(): string {
return $this->file->getETag();
}
- public function getMTime() {
+ public function getMTime(): int {
return $this->file->getMTime();
}
- public function getContent() {
+ public function getContent(): string {
$content = $this->encodingService->encodeToUtf8($this->file->getContent());
if ($content === null) {
throw new NotFoundException('File not compatible with text because it could not be encoded to UTF-8.');
@@ -67,15 +67,15 @@ class TextFile implements ISimpleFile {
return $content;
}
- public function putContent($data) {
- return $this->file->putContent($data);
+ public function putContent($data): void {
+ $this->file->putContent($data);
}
- public function delete() {
+ public function delete(): void {
$this->file->delete();
}
- public function getMimeType() {
+ public function getMimeType(): string {
return 'text/plain;encoding=utf-8';
}