Completed
Pull Request — 1.x (#13)
by
unknown
35:03 queued 01:43
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
6
class SimpleArrayParser extends AbstractParser
7
{
8
    /**
9
     * @param array[] $rawValue
10
     * @return array[]|null
11
     * @throws \MetaHydrator\Exception\ParsingException
12
     */
13
    public function parse($rawValue)
14
    {
15
        if ($rawValue === null) {
16
            return null;
17
        }
18
        if (is_array($rawValue) === false) {
19
            $this->throw();
20
        }
21
        return $rawValue;
22
    }
23
}
24