diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 56121d21d9..86f57f78fd 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -156,7 +156,7 @@ class File implements IWriter, IFileBased { * @param int $offset * @return array */ - public function getEntries($limit=50, $offset=0) { + public function getEntries(int $limit=50, int $offset=0):array { $minLevel = $this->config->getSystemValue("loglevel", ILogger::WARN); $entries = array(); $handle = @fopen($this->logFile, 'rb'); @@ -201,7 +201,7 @@ class File implements IWriter, IFileBased { /** * @return string */ - public function getLogFilePath() { + public function getLogFilePath():string { return $this->logFile; } } diff --git a/lib/public/Log/IFileBased.php b/lib/public/Log/IFileBased.php index e4befbfd63..c0eef47297 100644 --- a/lib/public/Log/IFileBased.php +++ b/lib/public/Log/IFileBased.php @@ -23,8 +23,21 @@ namespace OCP\Log; +/** + * Interface IFileBased + * + * @package OCP\Log + * + * @since 14.0.0 + */ interface IFileBased { - public function getLogFilePath(); + /** + * @since 14.0.0 + */ + public function getLogFilePath():string; - public function getEntries($limit=50, $offset=0); + /** + * @since 14.0.0 + */ + public function getEntries(int $limit=50, int $offset=0): array; }