Merge pull request #7838 from nextcloud/timefactory_strict
Make the ITimeFactory strict + return types
This commit is contained in:
commit
d44de92c31
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue