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
Pull Request — master (#216)
by Eric
09:22
created

Marker::getInfoWindow()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMap\Overlay;
13
14
use Ivory\GoogleMap\Base\Coordinate;
15
use Ivory\GoogleMap\Utility\OptionsAwareInterface;
16
use Ivory\GoogleMap\Utility\OptionsAwareTrait;
17
use Ivory\GoogleMap\Utility\VariableAwareTrait;
18
19
/**
20
 * @see http://code.google.com/apis/maps/documentation/javascript/reference.html#Marker
21
 *
22
 * @author GeLo <[email protected]>
23
 */
24
class Marker implements ExtendableInterface, OptionsAwareInterface
25
{
26
    use OptionsAwareTrait;
27
    use VariableAwareTrait;
28
29
    /**
30
     * @var Coordinate
31
     */
32
    private $position;
33
34
    /**
35
     * @var string|null
36
     */
37
    private $animation;
38
39
    /**
40
     * @var Icon|null
41
     */
42
    private $icon;
43
44
    /**
45
     * @var Symbol|null
46
     */
47
    private $symbol;
48
49
    /**
50
     * @var MarkerShape|null
51
     */
52
    private $shape;
53
54
    /**
55
     * @var InfoWindow|null
56
     */
57
    private $infoWindow;
58
59
    /**
60
     * @param Coordinate       $position
61 80
     * @param string|null      $animation
62
     * @param Icon|null        $icon
63
     * @param MarkerShape|null $shape
64
     * @param Symbol|null      $symbol
65
     * @param mixed[]          $options
66
     */
67
    public function __construct(
68 80
        Coordinate $position,
69 80
        $animation = null,
70 80
        Icon $icon = null,
71 80
        Symbol $symbol = null,
72 80
        MarkerShape $shape = null,
73 80
        array $options = []
74
    ) {
75
        $this->setPosition($position);
76
        $this->setAnimation($animation);
77
        $this->setShape($shape);
78 24
        $this->addOptions($options);
79
80 24
        if ($icon !== null) {
81
            $this->setIcon($icon);
82
        } elseif ($symbol !== null) {
83
            $this->setSymbol($symbol);
84
        }
85
    }
86 80
87
    /**
88 80
     * @return Coordinate
89 80
     */
90
    public function getPosition()
91
    {
92
        return $this->position;
93
    }
94 24
95
    /**
96 24
     * @param Coordinate $position
97
     */
98
    public function setPosition(Coordinate $position)
99
    {
100
        $this->position = $position;
101
    }
102 20
103
    /**
104 20
     * @return bool
105
     */
106
    public function hasAnimation()
107
    {
108
        return $this->animation !== null;
109
    }
110 80
111
    /**
112 80
     * @return string|null
113 80
     */
114
    public function getAnimation()
115
    {
116
        return $this->animation;
117
    }
118 36
119
    /**
120 36
     * @param string|null $animation
121
     */
122
    public function setAnimation($animation = null)
123
    {
124
        $this->animation = $animation;
125
    }
126 32
127
    /**
128 32
     * @return bool
129
     */
130
    public function hasIcon()
131
    {
132
        return $this->icon !== null;
133
    }
134 80
135
    /**
136 80
     * @return Icon|null
137 80
     */
138
    public function getIcon()
139
    {
140
        return $this->icon;
141
    }
142 24
143
    /**
144 24
     * @param Icon|null $icon
145
     */
146
    public function setIcon(Icon $icon = null)
147
    {
148
        $this->icon = $icon;
149
150 20
        if ($icon !== null) {
151
            $this->setSymbol(null);
152 20
        }
153
    }
154
155
    /**
156
     * @return bool
157
     */
158 80
    public function hasSymbol()
159
    {
160 80
        return $this->symbol !== null;
161 80
    }
162
163
    /**
164
     * @return Symbol|null
165
     */
166 48
    public function getSymbol()
167
    {
168 48
        return $this->symbol;
169
    }
170
171
    /**
172
     * @param Symbol|null $symbol
173
     */
174 40
    public function setSymbol(Symbol $symbol = null)
175
    {
176 40
        $this->symbol = $symbol;
177
178
        if ($symbol !== null) {
179
            $this->setIcon(null);
180
        }
181
    }
182 8
183
    /**
184 8
     * @return bool
185 8
     */
186
    public function hasShape()
187
    {
188
        return $this->shape !== null;
189
    }
190
191
    /**
192
     * @return MarkerShape|null
193
     */
194
    public function getShape()
195
    {
196
        return $this->shape;
197
    }
198
199
    /**
200
     * @param MarkerShape|null $shape
201
     */
202
    public function setShape(MarkerShape $shape = null)
203
    {
204
        $this->shape = $shape;
205
    }
206
207
    /**
208
     * @return bool
209
     */
210
    public function hasInfoWindow()
211
    {
212
        return $this->infoWindow !== null;
213
    }
214
215
    /**
216
     * @return InfoWindow|null
217
     */
218
    public function getInfoWindow()
219
    {
220
        return $this->infoWindow;
221
    }
222
223
    /**
224
     * @param InfoWindow|null $infoWindow
225
     */
226
    public function setInfoWindow(InfoWindow $infoWindow = null)
227
    {
228
        $this->infoWindow = $infoWindow;
229
    }
230
}
231