PreviewPublicController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
dl 0
loc 39
rs 10
c 1
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPreview() 0 2 1
A getThumbnails() 0 2 1
1
<?php
2
/**
3
 * Nextcloud - Gallery
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Olivier Paroz <[email protected]>
9
 *
10
 * @copyright Olivier Paroz 2017
11
 */
12
13
namespace OCA\Gallery\Controller;
14
15
/**
16
 * Class PreviewPublicController
17
 *
18
 * Note: Type casting only works if the "@param" parameters are also included in this class as
19
 * their not yet inherited
20
 *
21
 * @package OCA\Gallery\Controller
22
 */
23
class PreviewPublicController extends PreviewController {
24
25
	/**
26
	 * @PublicPage
27
	 * @UseSession
28
	 *
29
	 * Generates thumbnails for public galleries
30
	 *
31
	 * The session needs to be maintained open or previews can't be generated
32
	 * for files located on encrypted storage
33
	 *
34
	 * @inheritDoc
35
	 *
36
	 * @param string $ids the ID of the files of which we need thumbnail previews of
37
	 * @param bool $square
38
	 * @param float $scale
39
	 */
40
	public function getThumbnails($ids, $square, $scale) {
41
		return parent::getThumbnails($ids, $square, $scale);
42
	}
43
44
	/**
45
	 * @PublicPage
46
	 * @UseSession
47
	 * @NoCSRFRequired
48
	 *
49
	 * Shows a large preview of a file
50
	 *
51
	 * The session needs to be maintained open or previews can't be generated
52
	 * for files located on encrypted storage
53
	 *
54
	 * @inheritDoc
55
	 *
56
	 * @param int $fileId the ID of the file of which we need a large preview of
57
	 * @param int $width
58
	 * @param int $height
59
	 */
60
	public function getPreview($fileId, $width, $height) {
61
		return parent::getPreview($fileId, $width, $height);
62
	}
63
64
}
65