DownloadFile::getParams()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @author Threema GmbH
4
 * @copyright Copyright (c) 2015-2016 Threema GmbH
5
 */
6
7
8
namespace Threema\MsgApi\Commands;
9
10
use Threema\MsgApi\Commands\CommandInterface;
11
use Threema\MsgApi\Commands\Results\DownloadFileResult;
12
use Threema\MsgApi\Commands\Results\UploadFileResult;
13
14
class DownloadFile implements CommandInterface {
15
	/**
16
	 * @var string
17
	 */
18
	private $blobId;
19
20
	/**
21
	 * @param string $blobId
22
	 */
23
	public function __construct($blobId) {
24
		$this->blobId = $blobId;
25
	}
26
27
	/**
28
	 * @return array
29
	 */
30
	public function getParams() {
31
		return array();
32
	}
33
34
	/**
35
	 * @return string
36
	 */
37
	public function getPath() {
38
		return 'blobs/'.$this->blobId;
39
	}
40
41
	/**
42
	 * @param int $httpCode
43
	 * @param object $res
44
	 * @return UploadFileResult
45
	 */
46
	public function parseResult($httpCode, $res){
47
		return new DownloadFileResult($httpCode, $res);
48
	}
49
}
50