Completed
Push — master ( 7e748b...ca1854 )
by Karsten
02:03
created

AsMap::validate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 15
Code Lines 9

Duplication

Lines 15
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 2.3149

Importance

Changes 0
Metric Value
dl 15
loc 15
ccs 4
cts 7
cp 0.5714
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 9
nc 2
nop 1
crap 2.3149
1
<?php
2
/**
3
 * File was created 30.09.2015 10:49
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Annotation\Slumber;
7
8
use Doctrine\Common\Annotations\Annotation;
9
10
/**
11
 * AsMap treats the nested elements as a key value map.
12
 *
13
 * Keys are preserved.
14
 *
15
 * The result of slumbering will look like:
16
 *
17
 * Input:
18
 * <code>
19
 *   array ( 'a' => 'A', 'b' => 'B' )
20
 *   array ( 'C', 'B' )
21
 * </code>
22
 *
23
 * Output:
24
 * <code>
25
 *   { 'a' : 'A', 'b' : 'B' }
26
 *   { '0' : 'C', '1' : 'D' )
27
 * </code>
28
 *
29
 * @Annotation
30
 * @Annotation\Target("PROPERTY")
31
 *
32
 * @author Karsten J. Gerber <[email protected]>
33
 */
34
class AsMap extends AsCollection
35
{
36
}
37