FetchPublicKey::__construct()   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 1
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\FetchPublicKeyResult;
12
13
class FetchPublicKey implements CommandInterface {
14
	/**
15
	 * @var string
16
	 */
17
	private $threemaId;
18
19
	/**
20
	 * @param string $threemaId
21
	 */
22
	public function __construct($threemaId) {
23
		$this->threemaId = $threemaId;
24
	}
25
26
	/**
27
	 * @return array
28
	 */
29
	public function getParams() {
30
		return array();
31
	}
32
33
	/**
34
	 * @return string
35
	 */
36
	public function getPath() {
37
		return 'pubkeys/'.$this->threemaId;
38
	}
39
40
	/**
41
	 * @param int $httpCode
42
	 * @param object $res
43
	 * @return FetchPublicKeyResult
44
	 */
45
	public function parseResult($httpCode, $res){
46
		return new FetchPublicKeyResult($httpCode, $res);
47
	}
48
}
49