Skip to content
Snippets Groups Projects
Unverified Commit d44de92c authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #7838 from nextcloud/timefactory_strict

Make the ITimeFactory strict + return types
parents 0f729e2c 7ffd62bf
No related branches found
No related tags found
No related merge requests found
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, ownCloud, Inc.
* *
...@@ -22,7 +23,6 @@ ...@@ -22,7 +23,6 @@
* *
*/ */
namespace OC\AppFramework\Utility; namespace OC\AppFramework\Utility;
use OCP\AppFramework\Utility\ITimeFactory; use OCP\AppFramework\Utility\ITimeFactory;
...@@ -37,7 +37,7 @@ class TimeFactory implements ITimeFactory { ...@@ -37,7 +37,7 @@ class TimeFactory implements ITimeFactory {
/** /**
* @return int the result of a call to time() * @return int the result of a call to time()
*/ */
public function getTime() { public function getTime() : int {
return time(); return time();
} }
......
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, ownCloud, Inc.
* *
...@@ -21,7 +22,6 @@ ...@@ -21,7 +22,6 @@
* *
*/ */
namespace OCP\AppFramework\Utility; namespace OCP\AppFramework\Utility;
...@@ -35,6 +35,6 @@ interface ITimeFactory { ...@@ -35,6 +35,6 @@ interface ITimeFactory {
* @return int the result of a call to time() * @return int the result of a call to time()
* @since 8.0.0 * @since 8.0.0
*/ */
public function getTime(); public function getTime() : int;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment