Passed
Branch main (a3ac80)
by Frank
02:08
created

MultiPoint::addPoint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace PrinsFrank\PhpGeoSVG\Geometry\GeometryObject;
5
6
class MultiPoint extends GeometryObject
7
{
8
    /** @var Point[] */
9
    protected array $points = [];
10
11 1
    public function addPoint(Point $point): self
12
    {
13 1
        $this->points[] = $point;
14
15 1
        return $this;
16
    }
17
18
    /**
19
     * @return Point[]
20
     */
21 1
    public function getPoints(): array
22
    {
23 1
        return $this->points;
24
    }
25
}
26