ZoomControl::getStyle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
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\Control;
13
14
/**
15
 * @see http://code.google.com/apis/maps/documentation/javascript/reference.html#ZoomControlOptions
16
 *
17
 * @author GeLo <[email protected]>
18
 */
19 View Code Duplication
class ZoomControl
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    /**
22
     * @var string
23
     */
24
    private $position;
25
26
    /**
27
     * @var string
28
     */
29
    private $style;
30
31
    /**
32
     * @param string $position
33
     * @param string $style
34
     */
35 24
    public function __construct($position = ControlPosition::TOP_LEFT, $style = ZoomControlStyle::DEFAULT_)
36
    {
37 24
        $this->setPosition($position);
38 24
        $this->setStyle($style);
39 24
    }
40
41
    /**
42
     * @return string
43
     */
44 20
    public function getPosition()
45
    {
46 20
        return $this->position;
47
    }
48
49
    /**
50
     * @param string $position
51
     */
52 24
    public function setPosition($position)
53
    {
54 24
        $this->position = $position;
55 24
    }
56
57
    /**
58
     * @return string
59
     */
60 20
    public function getStyle()
61
    {
62 20
        return $this->style;
63
    }
64
65
    /**
66
     * @param string $style
67
     */
68 24
    public function setStyle($style)
69
    {
70 24
        $this->style = $style;
71 24
    }
72
}
73