AbstractPropertyMap::getMap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * ReportingCloud PHP SDK
6
 *
7
 * PHP SDK for ReportingCloud Web API. Authored and supported by Text Control GmbH.
8
 *
9
 * @link      https://www.reporting.cloud to learn more about ReportingCloud
10
 * @link      https://git.io/Jejj2 for the canonical source repository
11
 * @license   https://git.io/Jejjr
12
 * @copyright © 2022 Text Control GmbH
13
 */
14
15
namespace TxTextControl\ReportingCloud\PropertyMap;
16
17
/**
18
 * Abstract AbstractPropertyMap
19
 *
20
 * @package TxTextControl\ReportingCloud\PropertyMap
21
 * @author  Jonathan Maron (@JonathanMaron)
22
 */
23
abstract class AbstractPropertyMap implements PropertyMapInterface
24
{
25
    /**
26
     * Assoc array of properties
27
     * camelCase properties => Lower case underscore array keys
28
     *
29
     * @var array
30
     */
31
    protected array $map;
32
33
    /**
34
     * Return the property map
35
     *
36
     * @return array
37
     */
38 62
    public function getMap(): array
39
    {
40 62
        return $this->map ?? [];
41
    }
42
43
    /**
44
     * Set the property map
45
     *
46
     * @param array $map Assoc array of property data
47
     *
48
     * @return self
49
     */
50 62
    public function setMap(array $map): self
51
    {
52 62
        $this->map = $map;
53
54 62
        return $this;
55
    }
56
}
57