Completed
Push — stable9 ( 34bd66...defdb6 )
by Olivier
11:26 queued 07:53
created

PreviewPublicController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 41
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getThumbnails() 0 3 1
A getPreview() 0 3 1
1
<?php
2
/**
3
 * ownCloud - galleryplus
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 2014-2016
11
 */
12
13
namespace OCA\GalleryPlus\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\GalleryPlus\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 2
	public function getThumbnails($ids, $square, $scale) {
41 2
		return parent::getThumbnails($ids, $square, $scale);
42
	}
43
44
	/**
45
	 * @PublicPage
46
	 * @UseSession
47
	 *
48
	 * Shows a large preview of a file
49
	 *
50
	 * The session needs to be maintained open or previews can't be generated
51
	 * for files located on encrypted storage
52
	 *
53
	 * @inheritDoc
54
	 *
55
	 * @param int $fileId the ID of the file of which we need a large preview of
56
	 * @param int $width
57
	 * @param int $height
58
	 */
59 4
	public function getPreview($fileId, $width, $height) {
60 4
		return parent::getPreview($fileId, $width, $height);
61
	}
62
63
}
64