GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 65884f...516ada )
by Petr
08:31 queued 06:21
created

Icon::setOrigin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
/**
4
 * Copyright (c) 2015 Petr Olišar (http://olisar.eu)
5
 *
6
 * For the full copyright and license information, please view
7
 * the file LICENSE.md that was distributed with this source code.
8
 */
9
10
namespace Oli\GoogleAPI\Marker;
11
12
13
/**
14
 * Description of Icon
15
 *
16
 * @author petr
17
 */
18
class Icon extends \Nette\Object
19 1
{
20
21
	/**
22
	 * @var string
23
	 */
24
	private $url;
25
26
	/**
27
	 * @var array|null
28
	 */
29
	private $anchor;
30
31
	/**
32
	 * @var array|null
33
	 */
34
	private $size;
35
36
	/**
37
	 * @var array|null
38
	 */
39
	private $origin;
40
41
42
	/**
43
	 * Icon constructor.
44
	 * @param string $url
45
	 */
46
	public function __construct($url)
47
	{
48 1
		$this->url = $url;
49 1
	}
50
51
52
	/**
53
	 * @return null
54
	 */
55
	public function getUrl()
56
	{
57 1
		return $this->url;
58
	}
59
60
61
	/**
62
	 * @return array|null
63
	 */
64
	public function getAnchor()
65
	{
66 1
		return $this->anchor;
67
	}
68
69
70
	/**
71
	 * @return array|null
72
	 */
73
	public function getSize()
74
	{
75 1
		return $this->size;
76
	}
77
78
79
	/**
80
	 * @return array|null
81
	 */
82
	public function getOrigin()
83
	{
84 1
		return $this->origin;
85
	}
86
87
88
	/**
89
	 * @param string $url
90
	 * @return $this
91
	 */
92
	public function setUrl($url)
93
	{
94 1
		$this->url = $url;
95 1
		return $this;
96
	}
97
98
99
	/**
100
	 * @param array $anchor
101
	 * @return $this
102
	 */
103
	public function setAnchor(array $anchor)
104
	{
105 1
		$this->anchor = $anchor;
106 1
		return $this;
107
	}
108
109
110
	/**
111
	 * @param array $size
112
	 * @return $this
113
	 */
114
	public function setSize(array $size)
115
	{
116 1
		$this->size = $size;
117 1
		return $this;
118
	}
119
120
121
	/**
122
	 * @param array $origin
123
	 * @return $this
124
	 */
125
	public function setOrigin(array $origin)
126
	{
127 1
		$this->origin = $origin;
128 1
		return $this;
129
	}
130
131
132
	/**
133
	 * @return array
134
	 */
135
	public function getArray()
136
	{
137
		return [
138 1
			'url' => $this->getUrl(),
139 1
			'size' => $this->getSize(),
140 1
			'origin' => $this->getOrigin(),
141 1
			'anchor' => $this->getAnchor()
142 1
		];
143
	}
144
	
145
}
146