Add more type hinting
This commit is contained in:
parent
1a1dc9b335
commit
e518eacba6
|
@ -26,7 +26,7 @@ abstract class Provider implements IProvider {
|
||||||
* @param \OCP\Files\FileInfo $file
|
* @param \OCP\Files\FileInfo $file
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isAvailable($file) {
|
public function isAvailable(\OCP\Files\FileInfo $file) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class TXT extends Provider {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function isAvailable($file) {
|
public function isAvailable(\OCP\Files\FileInfo $file) {
|
||||||
return $file->getSize() > 5;
|
return $file->getSize() > 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ interface IPreview {
|
||||||
* In order to improve lazy loading a closure can be registered which will be
|
* In order to improve lazy loading a closure can be registered which will be
|
||||||
* called in case preview providers are actually requested
|
* 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 string $mimeTypeRegex Regex with the mime types that are supported by this provider
|
||||||
* @param \Closure $callable
|
* @param \Closure $callable
|
||||||
|
|
|
@ -23,7 +23,7 @@ interface IProvider {
|
||||||
* @param \OCP\Files\FileInfo $file
|
* @param \OCP\Files\FileInfo $file
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isAvailable($file);
|
public function isAvailable(\OCP\Files\FileInfo $file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get thumbnail for file at path $path
|
* get thumbnail for file at path $path
|
||||||
|
|
Loading…
Reference in New Issue