]> source.dussan.org Git - nextcloud-server.git/commitdiff
add an interface for the timefactory class
authorBernhard Posselt <dev@bernhard-posselt.com>
Sat, 20 Dec 2014 14:52:25 +0000 (15:52 +0100)
committerBernhard Posselt <dev@bernhard-posselt.com>
Sat, 20 Dec 2014 14:53:31 +0000 (15:53 +0100)
fix indention

lib/private/appframework/utility/timefactory.php
lib/public/appframework/utility/itimefactory.php [new file with mode: 0644]

index a9b07a356e3e542ca554769ab369e4aa05bacc83..f13b73407ab064349ffe0faa2c2dfb5839427078 100644 (file)
 
 namespace OC\AppFramework\Utility;
 
+use OCP\AppFramework\Utility\ITimeFactory;
+
 
 /**
  * Needed to mock calls to time()
  */
-class TimeFactory {
+class TimeFactory implements ITimeFactory {
 
 
        /**
diff --git a/lib/public/appframework/utility/itimefactory.php b/lib/public/appframework/utility/itimefactory.php
new file mode 100644 (file)
index 0000000..c661f8e
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * ownCloud - App Framework
+ *
+ * @author Bernhard Posselt
+ * @copyright 2014 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+namespace OCP\AppFramework\Utility;
+
+
+/**
+ * Needed to mock calls to time()
+ */
+interface ITimeFactory {
+
+       /**
+        * @return int the result of a call to time()
+        */
+       public function getTime();
+
+}