aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-01 18:35:47 -0300
committerRobin Appelman <robin@icewind.nl>2017-05-02 13:43:47 +0200
commit6aac094091076d503d6376ca74d2bedadff63de7 (patch)
tree4d3272a8ef0b3ca99eed75d26f1b8092647e791d /lib
parent4dfd90abc423ae34add34a2293c24de8b398246c (diff)
downloadnextcloud-server-6aac094091076d503d6376ca74d2bedadff63de7.tar.gz
nextcloud-server-6aac094091076d503d6376ca74d2bedadff63de7.zip
Add PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Preview/Generator.php2
-rw-r--r--lib/private/PreviewManager.php3
-rw-r--r--lib/public/IPreview.php3
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index 0fb284259aa..5a264c2bbd5 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -84,6 +84,7 @@ class Generator {
* @param string $mimeType
* @return ISimpleFile
* @throws NotFoundException
+ * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
*/
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null) {
$this->eventDispatcher->dispatch(
@@ -299,6 +300,7 @@ class Generator {
* @param int $maxHeight
* @return ISimpleFile
* @throws NotFoundException
+ * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
*/
private function generatePreview(ISimpleFolder $previewFolder, ISimpleFile $maxPreview, $width, $height, $crop, $maxWidth, $maxHeight) {
$preview = $this->helper->getImage($maxPreview);
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 8c5a7ad29f1..12fcc292c63 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -182,7 +182,8 @@ class PreviewManager implements IPreview {
* @param string $mimeType
* @return ISimpleFile
* @throws NotFoundException
- * @since 11.0.0
+ * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
+ * @since 11.0.0 - \InvalidArgumentException was added in 12.0.0
*/
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null) {
if ($this->generator === null) {
diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php
index 207539b1170..7705df61a17 100644
--- a/lib/public/IPreview.php
+++ b/lib/public/IPreview.php
@@ -104,7 +104,8 @@ interface IPreview {
* @param string $mimeType To force a given mimetype for the file (files_versions needs this)
* @return ISimpleFile
* @throws NotFoundException
- * @since 11.0.0
+ * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
+ * @since 11.0.0 - \InvalidArgumentException was added in 12.0.0
*/
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null);