ActionArea   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
dl 0
loc 43
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getArea() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the LineMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LineMob\Core\Template\ImageMap;
13
14
use LINE\LINEBot\ImagemapActionBuilder\AreaBuilder;
15
16
/**
17
 * @author WATCHDOGS <[email protected]>
18
 */
19
class ActionArea
20
{
21
    /**
22
     * @var int
23
     */
24
    public $x;
25
26
    /**
27
     * @var int
28
     */
29
    public $y;
30
31
    /**
32
     * @var int
33
     */
34
    public $width;
35
36
    /**
37
     * @var int
38
     */
39
    public $height;
40
41
    /**
42
     * ActionArea constructor.
43
     * @param int $x
44
     * @param int $y
45
     * @param int $width
46
     * @param int $height
47
     */
48
    public function __construct($x, $y, $width, $height)
49
    {
50
        $this->x = $x;
51
        $this->y = $y;
52
        $this->width = $width;
53
        $this->height = $height;
54
    }
55
56
    /**
57
     * @return AreaBuilder
58
     */
59
    public function getArea()
60
    {
61
        return new AreaBuilder($this->x, $this->y, $this->width, $this->height);
62
    }
63
}
64