From e518eacba6837a059381e1ffa2af4a10eba0e8ae Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 12 Mar 2015 12:20:39 +0100 Subject: [PATCH] Add more type hinting --- lib/private/preview/provider.php | 2 +- lib/private/preview/txt.php | 2 +- lib/public/ipreview.php | 2 +- lib/public/preview/iprovider.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php index caf71fd221..3cce8c2ab8 100644 --- a/lib/private/preview/provider.php +++ b/lib/private/preview/provider.php @@ -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; } diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php index 8b414dc572..772b56c72c 100644 --- a/lib/private/preview/txt.php +++ b/lib/private/preview/txt.php @@ -18,7 +18,7 @@ class TXT extends Provider { /** * {@inheritDoc} */ - public function isAvailable($file) { + public function isAvailable(\OCP\Files\FileInfo $file) { return $file->getSize() > 5; } diff --git a/lib/public/ipreview.php b/lib/public/ipreview.php index e1562bce58..c1bc4cb680 100644 --- a/lib/public/ipreview.php +++ b/lib/public/ipreview.php @@ -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 diff --git a/lib/public/preview/iprovider.php b/lib/public/preview/iprovider.php index 96bde3d5a2..74e5cca05d 100644 --- a/lib/public/preview/iprovider.php +++ b/lib/public/preview/iprovider.php @@ -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