From 8d2baff781d4060f56a809c1b455106575571707 Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Wed, 27 Jul 2022 08:33:20 +0200 Subject: [PATCH] File : @return correctely typed --- src/File.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/File.php b/src/File.php index bc29f4e..c9b8e37 100644 --- a/src/File.php +++ b/src/File.php @@ -131,7 +131,7 @@ class File /** Chroot in the provided directory * @param string $directory The directory to chroot - * @return true if the chroot is done, false if there is a failure + * @return boolean true if the chroot is done, false if there is a failure * @throws If directory not exists, or the directory is not executable */ public function chroot ($directory) @@ -232,7 +232,7 @@ class File * @param string $filename Path to the file where to write the data * @param string $data The data to write * @param integer|null $flags The optional flags - * @return the length of the data stored + * @return integer the length of the data stored * @throws If parent directory not exists, is not writeable, or the file * exists and is not writeable */ @@ -260,9 +260,9 @@ class File /** Get the file modification time of a file * @param string $filename Path to the file - * @return the time the file was last modified, or FALSE on failure. The - * time is returned as a Unix timestamp, which is suitable for the date() - * function. + * @return integer|boolean the time the file was last modified, or FALSE + * on failure. The time is returned as a Unix timestamp, which is suitable + * for the date() function. * @throws If parent directory not exists, is not writeable */ public function filemtime ($filename) @@ -277,7 +277,7 @@ class File /** Get the file size * @param string $filename Path to the file - * @return the size of the file or FALSE on failure. + * @return integer|boolean the size of the file or FALSE on failure. * @throws If parent directory not exists, is not writeable */ public function filesize ($filename) @@ -292,7 +292,7 @@ class File /** Get the file info of the provided filename * @param string $filename Path to the file - * @return the mimetype of the file + * @return string the mimetype of the file * @throws If parent directory not exists, is not writeable */ public function fileinfoMimeType ($filename) @@ -515,7 +515,7 @@ class File /** Calculate the md5 sum of a file * @param string $filename The file to hash - * @return the calulated hash + * @return string the calulated hash * @throws If the file doesn't exists */ public function md5_file ($filename) @@ -781,7 +781,7 @@ class File /** Calculate the sha1 sum of a file * @param string $filename The file to hash - * @return the calulated hash + * @return string the calulated hash * @throws If the file doesn't exists */ public function sha1_file ($filename) @@ -849,8 +849,8 @@ class File * Must use the filesystem path (complete) and not the version in chroot. * The last directoy must be executable and readable (no test for writeable) * @param string $path The directory path to check - * @return true if the path is executable for all the parents and for the - * last directory + * @return boolean true if the path is executable for all the parents and + * for the last directory * @throws if there is a missing part, or a parent is not executable */ private function checkPathRO ($path) @@ -967,7 +967,7 @@ class File * @param integer $prio The message priority. Should be higher than * $this->debug to save the message * @param string $message The message to save - * @return null; + * @return null */ private function debug ($prio, $message) // {{{