Passed
Pull Request — main (#10)
by
unknown
02:31
created

GeometryObject   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
eloc 13
dl 0
loc 40
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 3 1
A setTitle() 0 5 1
A getFeatureClass() 0 3 1
A setFeatureClass() 0 5 1
A setProperties() 0 5 1
A getProperties() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PrinsFrank\PhpGeoSVG\Geometry\GeometryObject;
6
7
abstract class GeometryObject
8
{
9
    protected ?string $title        = null;
10
    protected ?string $featureClass = null;
11
    protected ?array $properties = null;
12
13 1
    public function setTitle(?string $title): self
14
    {
15 1
        $this->title = $title;
16
17 1
        return $this;
18
    }
19
20 1
    public function getTitle(): ?string
21
    {
22 1
        return $this->title;
23
    }
24
25 1
    public function setFeatureClass(string $featureClass): self
26
    {
27 1
        $this->featureClass = $featureClass;
28
29 1
        return $this;
30
    }
31
32 1
    public function getFeatureClass(): ?string
33
    {
34 1
        return $this->featureClass;
35
    }
36
37 1
    public function getProperties(): ?array
38
    {
39 1
        return $this->properties;
40
    }
41
42 1
    public function setProperties(array $properties): self
43
    {
44 1
        $this->properties = $properties;
45
46 1
        return $this;
47
    }
48
49
50
}
51