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:
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';
}