Passed
Push — all-contributors/add-formikaio ( 169f6c )
by
unknown
08:10 queued 05:51
created

Rectangle::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 4
dl 0
loc 8
ccs 0
cts 8
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * JPGraph v4.0.3
5
 */
6
7
namespace Amenadiel\JpGraph\Util;
8
9
// Utility class to hold coordinates for a rectangle
10
class Rectangle
11
{
12
    public $x;
13
    public $y;
14
    public $w;
15
    public $h;
16
    public $xe;
17
    public $ye;
18
19
    public function __construct($aX, $aY, $aWidth, $aHeight)
20
    {
21
        $this->x  = $aX;
22
        $this->y  = $aY;
23
        $this->w  = $aWidth;
24
        $this->h  = $aHeight;
25
        $this->xe = $aX + $aWidth - 1;
26
        $this->ye = $aY + $aHeight - 1;
27
    }
28
}
29