summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-04-27 09:56:05 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-27 09:56:05 +0200
commit546d94c3ec5b0cb06cc284dead0da98ee346fc81 (patch)
treef64015e26506776e16ce679e61f4e8571e92b7af /lib/public
parent5e96228eb1f7999a327dacab22055ec2aa8e28a3 (diff)
downloadnextcloud-server-546d94c3ec5b0cb06cc284dead0da98ee346fc81.tar.gz
nextcloud-server-546d94c3ec5b0cb06cc284dead0da98ee346fc81.zip
Fix file_get_content signatures to make it clear it can return false
In File::getContent, which must return a string, throw an Exception instead of returning false. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/File.php1
-rw-r--r--lib/public/Files/Storage.php2
-rw-r--r--lib/public/Files/Storage/IStorage.php2
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/public/Files/File.php b/lib/public/Files/File.php
index 93d0ab860c1..7c1e36cb3eb 100644
--- a/lib/public/Files/File.php
+++ b/lib/public/Files/File.php
@@ -40,6 +40,7 @@ interface File extends Node {
*
* @return string
* @throws NotPermittedException
+ * @throws GenericFileException
* @throws LockedException
* @since 6.0.0
*/
diff --git a/lib/public/Files/Storage.php b/lib/public/Files/Storage.php
index c165266a1b7..31405a26bfa 100644
--- a/lib/public/Files/Storage.php
+++ b/lib/public/Files/Storage.php
@@ -217,7 +217,7 @@ interface Storage extends IStorage {
* see https://www.php.net/manual/en/function.file_get_contents.php
*
* @param string $path
- * @return string|bool
+ * @return string|false
* @since 6.0.0
*/
public function file_get_contents($path);
diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php
index 2f38165830b..00e98fdfbb6 100644
--- a/lib/public/Files/Storage/IStorage.php
+++ b/lib/public/Files/Storage/IStorage.php
@@ -214,7 +214,7 @@ interface IStorage {
* see https://www.php.net/manual/en/function.file_get_contents.php
*
* @param string $path
- * @return string|bool
+ * @return string|false
* @since 9.0.0
*/
public function file_get_contents($path);