]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add more type hinting
authorJoas Schilling <nickvergessen@owncloud.com>
Thu, 12 Mar 2015 11:20:39 +0000 (12:20 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Mon, 16 Mar 2015 11:44:11 +0000 (12:44 +0100)
lib/private/preview/provider.php
lib/private/preview/txt.php
lib/public/ipreview.php
lib/public/preview/iprovider.php

index caf71fd22191ca99da189a9966025fddbb0582e2..3cce8c2ab851f00adde5dc562dd456f9b25d72e1 100644 (file)
@@ -26,7 +26,7 @@ abstract class Provider implements IProvider {
         * @param \OCP\Files\FileInfo $file
         * @return bool
         */
-       public function isAvailable($file) {
+       public function isAvailable(\OCP\Files\FileInfo $file) {
                return true;
        }
 
index 8b414dc5726f8f00ac7cab6732e52ceeadc604bd..772b56c72cc8ff901a79e6aa6b992e19f590768b 100644 (file)
@@ -18,7 +18,7 @@ class TXT extends Provider {
        /**
         * {@inheritDoc}
         */
-       public function isAvailable($file) {
+       public function isAvailable(\OCP\Files\FileInfo $file) {
                return $file->getSize() > 5;
        }
 
index e1562bce58f8acbd2ef8b6efd6931bf8f69a088b..c1bc4cb680c7ab0f3f139e3ab89170aaac6d085a 100644 (file)
@@ -41,7 +41,7 @@ interface IPreview {
         * In order to improve lazy loading a closure can be registered which will be
         * called in case preview providers are actually requested
         *
-        * $callable has to return an instance of \OC\Preview\Provider
+        * $callable has to return an instance of \OCP\Preview\IProvider
         *
         * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider
         * @param \Closure $callable
index 96bde3d5a268679f440dc53943a3f61a93036386..74e5cca05d9518d332a24f6f7ba59887cdd94352 100644 (file)
@@ -23,7 +23,7 @@ interface IProvider {
         * @param \OCP\Files\FileInfo $file
         * @return bool
         */
-       public function isAvailable($file);
+       public function isAvailable(\OCP\Files\FileInfo $file);
 
        /**
         * get thumbnail for file at path $path