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

SimpleArrayParser::parse()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 3
nc 3
nop 1
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