From 53f16fd031d76208677cac8751b175d765587d2f Mon Sep 17 00:00:00 2001 From: Nicolas Reynis Date: Mon, 7 Sep 2020 15:50:06 +0200 Subject: [PATCH] More precise signatures --- src/Filesystem.php | 14 +++++++------- src/Plugin/GetWithMetadata.php | 4 ++-- src/Plugin/ListPaths.php | 2 +- src/Plugin/ListWith.php | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Filesystem.php b/src/Filesystem.php index 43d9a4e00..c4eaf2781 100644 --- a/src/Filesystem.php +++ b/src/Filesystem.php @@ -8,13 +8,13 @@ use League\Flysystem\Util\ContentListingFormatter; /** - * @method void emptyDir(string $dirname) - * @method array getWithMetadata(string $path, array $metadata) - * @method bool forceCopy(string $path, string $newpath) - * @method bool forceRename(string $path, string $newpath) - * @method array listFiles(string $path = '', boolean $recursive = false) - * @method array listPaths(string $path = '', boolean $recursive = false) - * @method array listWith(array $keys = [], $directory = '', $recursive = false) + * @method void emptyDir(string $dirname) + * @method array|false getWithMetadata(string $path, string[] $metadata) + * @method bool forceCopy(string $path, string $newpath) + * @method bool forceRename(string $path, string $newpath) + * @method array listFiles(string $path = '', boolean $recursive = false) + * @method string[] listPaths(string $path = '', boolean $recursive = false) + * @method array listWith(string[] $keys = [], $directory = '', $recursive = false) */ class Filesystem implements FilesystemInterface { diff --git a/src/Plugin/GetWithMetadata.php b/src/Plugin/GetWithMetadata.php index 6fe4f0562..2f13d2fd2 100644 --- a/src/Plugin/GetWithMetadata.php +++ b/src/Plugin/GetWithMetadata.php @@ -20,8 +20,8 @@ public function getMethod() /** * Get metadata for an object with required metadata. * - * @param string $path path to file - * @param array $metadata metadata keys + * @param string $path path to file + * @param string[] $metadata metadata keys * * @throws InvalidArgumentException * @throws FileNotFoundException diff --git a/src/Plugin/ListPaths.php b/src/Plugin/ListPaths.php index 514bdf0b3..0889d1f8d 100644 --- a/src/Plugin/ListPaths.php +++ b/src/Plugin/ListPaths.php @@ -20,7 +20,7 @@ public function getMethod() * @param string $directory * @param bool $recursive * - * @return array paths + * @return string[] paths */ public function handle($directory = '', $recursive = false) { diff --git a/src/Plugin/ListWith.php b/src/Plugin/ListWith.php index d90464e52..d64debeca 100644 --- a/src/Plugin/ListWith.php +++ b/src/Plugin/ListWith.php @@ -17,9 +17,9 @@ public function getMethod() /** * List contents with metadata. * - * @param array $keys - * @param string $directory - * @param bool $recursive + * @param string[] $keys + * @param string $directory + * @param bool $recursive * * @return array listing with metadata */