diff options
-rw-r--r-- | lib/private/Log/File.php | 4 | ||||
-rw-r--r-- | lib/public/Log/IFileBased.php | 17 |
2 files changed, 17 insertions, 4 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 56121d21d9f..86f57f78fda 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 e4befbfd632..c0eef472975 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; } |