EnabledPersistence   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDefinition() 0 4 1
A getSelectedStorageType() 0 4 1
1
<?php
2
namespace PSB\Core\Persistence;
3
4
5
class EnabledPersistence
6
{
7
    /**
8
     * @var PersistenceDefinition
9
     */
10
    private $definition;
11
12
    /**
13
     * @var StorageType
14
     */
15
    private $selectedStorageType;
16
17
    /**
18
     * @param PersistenceDefinition $definition
19
     * @param StorageType|null      $selectedStorageType
20
     */
21 7
    public function __construct(PersistenceDefinition $definition, StorageType $selectedStorageType = null)
22
    {
23 7
        $this->definition = $definition;
24 7
        $this->selectedStorageType = $selectedStorageType;
25 7
    }
26
27
    /**
28
     * @return PersistenceDefinition
29
     */
30 3
    public function getDefinition()
31
    {
32 3
        return $this->definition;
33
    }
34
35
    /**
36
     * @return StorageType|null
37
     */
38 3
    public function getSelectedStorageType()
39
    {
40 3
        return $this->selectedStorageType;
41
    }
42
}
43