Passed
Push — master ( c757f0...00b6ca )
by Koldo
02:49
created

MappingConfigValidator   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 12 4
1
<?php
2
3
namespace DRKP\ZF3Doctrine;
4
5
/**
6
 * Class MappingConfigValidator
7
 * @package DRKP\ZF3Doctrine
8
 */
9
class MappingConfigValidator
10
{
11
    /**
12
     * @param array $mapping
13
     * @return bool
14
     */
15 8
    public static function validate(array $mapping)
16
    {
17
        if (
18 8
            !array_key_exists('path', $mapping) ||
19 6
            !array_key_exists('namespace', $mapping) ||
20 6
            !array_key_exists('type', $mapping)
21 8
        ) {
22 2
            return false;
23
        }
24
25 6
        return true;
26
    }
27
}
28