Completed
Push — 1.x ( abd3a2...c38a91 )
by David
05:35
created

SimpleArrayParser   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse() 0 10 3
1
<?php
2
3
namespace MetaHydrator\Parser;
4
5
class SimpleArrayParser extends AbstractParser
6
{
7
    /**
8
     * @param array[] $rawValue
9
     * @return array[]|null
10
     * @throws \MetaHydrator\Exception\ParsingException
11
     */
12
    public function parse($rawValue)
13
    {
14
        if ($rawValue === null) {
15
            return null;
16
        }
17
        if (is_array($rawValue) === false) {
18
            $this->throw();
19
        }
20
        return $rawValue;
21
    }
22
}
23