diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-22 12:05:26 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-14 17:20:51 +0200 |
commit | 19a36b58a69f9a8cc31da213657fdf828d9fdb3c (patch) | |
tree | 0a1c6b732a0b5548450ae3114e3fe8ebbaf6eb6d /lib/public/Files/SimpleFS/ISimpleFile.php | |
parent | b282fe1e6f5587a6440d170df245ad5acb8dc976 (diff) | |
download | nextcloud-server-19a36b58a69f9a8cc31da213657fdf828d9fdb3c.tar.gz nextcloud-server-19a36b58a69f9a8cc31da213657fdf828d9fdb3c.zip |
Add typing to SimpleFS
- Fix putContent sometimes return a bool and sometimes nothing
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/public/Files/SimpleFS/ISimpleFile.php')
-rw-r--r-- | lib/public/Files/SimpleFS/ISimpleFile.php | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php index 8f1921cb7cb..34cd128d449 100644 --- a/lib/public/Files/SimpleFS/ISimpleFile.php +++ b/lib/public/Files/SimpleFS/ISimpleFile.php @@ -41,44 +41,39 @@ interface ISimpleFile { /** * Get the name * - * @return string * @since 11.0.0 */ - public function getName(); + public function getName(): string; /** * Get the size in bytes * - * @return int * @since 11.0.0 */ - public function getSize(); + public function getSize(): int; /** * Get the ETag * - * @return string * @since 11.0.0 */ - public function getETag(); + public function getETag(): string; /** * Get the last modification time * - * @return int * @since 11.0.0 */ - public function getMTime(); + public function getMTime(): int; /** * Get the content * * @throws NotPermittedException * @throws NotFoundException - * @return string * @since 11.0.0 */ - public function getContent(); + public function getContent(): string; /** * Overwrite the file @@ -88,7 +83,7 @@ interface ISimpleFile { * @throws NotFoundException * @since 11.0.0 */ - public function putContent($data); + public function putContent($data): void; /** * Delete the file @@ -96,15 +91,14 @@ interface ISimpleFile { * @throws NotPermittedException * @since 11.0.0 */ - public function delete(); + public function delete(): void; /** * Get the MimeType * - * @return string * @since 11.0.0 */ - public function getMimeType(); + public function getMimeType(): string; /** * @since 24.0.0 |