Merge pull request #7838 from nextcloud/timefactory_strict

Make the ITimeFactory strict + return types
This commit is contained in:
Roeland Jago Douma 2018-01-15 09:27:37 +01:00 committed by GitHub
commit d44de92c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@ -22,7 +23,6 @@
*
*/
namespace OC\AppFramework\Utility;
use OCP\AppFramework\Utility\ITimeFactory;
@ -37,7 +37,7 @@ class TimeFactory implements ITimeFactory {
/**
* @return int the result of a call to time()
*/
public function getTime() {
public function getTime() : int {
return time();
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@ -21,7 +22,6 @@
*
*/
namespace OCP\AppFramework\Utility;
@ -35,6 +35,6 @@ interface ITimeFactory {
* @return int the result of a call to time()
* @since 8.0.0
*/
public function getTime();
public function getTime() : int;
}