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

GeometryCollection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 2
b 0
f 0
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getGeometryObjects() 0 3 1
A addGeometryObject() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace PrinsFrank\PhpGeoSVG\Geometry;
5
6
use PrinsFrank\PhpGeoSVG\Geometry\GeometryObject\GeometryObject;
7
8
class GeometryCollection
9
{
10
    /** @var GeometryObject[] */
11
    protected array $geometryObjects = [];
12
13 1
    public function addGeometryObject(GeometryObject $geometryObject): self
14
    {
15 1
        $this->geometryObjects[] = $geometryObject;
16
17 1
        return $this;
18
    }
19
20
    /**
21
     * @return GeometryObject[]
22
     */
23 1
    public function getGeometryObjects(): array
24
    {
25 1
        return $this->geometryObjects;
26
    }
27
}
28