summaryrefslogtreecommitdiffstats
path: root/lib/private/preview.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-21 15:44:54 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-21 15:44:54 +0200
commite88731a477991f54120939724da3c8a455c48b97 (patch)
treeb33e14f6bce285890135bce4bdd3ab8099d6819b /lib/private/preview.php
parent4fe5ca1908757781872133c7140f4c8848e94ac6 (diff)
downloadnextcloud-server-e88731a477991f54120939724da3c8a455c48b97.tar.gz
nextcloud-server-e88731a477991f54120939724da3c8a455c48b97.zip
Some more PHPDoc fixes
Diffstat (limited to 'lib/private/preview.php')
-rwxr-xr-xlib/private/preview.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 0187b4aacbb..cdf22240382 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -72,6 +72,7 @@ class Preview {
* @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
* @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
* @param bool $scalingUp Disable/Enable upscaling of previews
+ * @throws \Exception
* @return mixed (bool / string)
* false if thumbnail does not exist
* path to thumbnail if thumbnail exists
@@ -172,6 +173,9 @@ class Preview {
return $this->configMaxY;
}
+ /**
+ * @return false|Files\FileInfo|\OCP\Files\FileInfo
+ */
protected function getFileInfo() {
$absPath = $this->fileView->getAbsolutePath($this->file);
$absPath = Files\Filesystem::normalizePath($absPath);
@@ -211,6 +215,7 @@ class Preview {
/**
* @brief set the the max width of the preview
* @param int $maxX
+ * @throws \Exception
* @return $this
*/
public function setMaxX($maxX = 1) {
@@ -231,6 +236,7 @@ class Preview {
/**
* @brief set the the max height of the preview
* @param int $maxY
+ * @throws \Exception
* @return $this
*/
public function setMaxY($maxY = 1) {
@@ -401,6 +407,10 @@ class Preview {
return $possibleThumbnails;
}
+ /**
+ * @param string $name
+ * @return array
+ */
private function getDimensionsFromFilename($name) {
$size = explode('-', $name);
$x = (int) $size[0];
@@ -409,6 +419,11 @@ class Preview {
return array($x, $y, $aspectRatio);
}
+ /**
+ * @param int $x
+ * @param int $y
+ * @return bool
+ */
private function unscalable($x, $y) {
$maxX = $this->getMaxX();
@@ -707,6 +722,7 @@ class Preview {
/**
* @param string $mimeType
+ * @return bool
*/
public static function isMimeSupported($mimeType) {
if (!\OC_Config::getValue('enable_previews', true)) {