add missing php doc and type hints

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2018-04-25 16:01:17 +02:00 committed by Morris Jobke
parent a21a5bc4ec
commit 5751788282
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
2 changed files with 17 additions and 4 deletions

View File

@ -156,7 +156,7 @@ class File implements IWriter, IFileBased {
* @param int $offset * @param int $offset
* @return array * @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); $minLevel = $this->config->getSystemValue("loglevel", ILogger::WARN);
$entries = array(); $entries = array();
$handle = @fopen($this->logFile, 'rb'); $handle = @fopen($this->logFile, 'rb');
@ -201,7 +201,7 @@ class File implements IWriter, IFileBased {
/** /**
* @return string * @return string
*/ */
public function getLogFilePath() { public function getLogFilePath():string {
return $this->logFile; return $this->logFile;
} }
} }

View File

@ -23,8 +23,21 @@
namespace OCP\Log; namespace OCP\Log;
/**
* Interface IFileBased
*
* @package OCP\Log
*
* @since 14.0.0
*/
interface IFileBased { 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;
} }