TypeKeyProperty   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAllowedTypes() 0 4 1
1
<?php
2
namespace GenericCollections\Utils;
3
4
/**
5
 * TypeKeyProperty is a ValueObject utility class,
6
 * the only logic in here is validate the type parameter.
7
 *
8
 * This is an specialized class that only allows types:
9
 * integer, int, long and string
10
 *
11
 * @package GenericCollections\Utils
12
 */
13
class TypeKeyProperty extends TypeProperty
14
{
15 29
    public function getAllowedTypes()
16
    {
17 29
        return ['string', 'int', 'integer', 'long'];
18
    }
19
}
20