Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
9 | 5 | public static function decode(array $line) |
|
10 | { |
||
11 | 5 | if ($line[LineEncoder::META_KEY][LineEncoder::TYPE_KEY] === LineEncoder::TYPE_THROWABLE) { |
|
12 | 3 | return \WyriHaximus\throwable_decode($line[LineEncoder::VALUE_KEY]); |
|
13 | } |
||
14 | |||
15 | 2 | foreach ($line[LineEncoder::META_KEY][LineEncoder::THROWABLES_KEY] as $throwableKey) { |
|
16 | 1 | $line[LineEncoder::VALUE_KEY][$throwableKey] = \WyriHaximus\throwable_decode($line[LineEncoder::VALUE_KEY][$throwableKey]); |
|
17 | } |
||
18 | |||
19 | 2 | return Hash::expand($line[LineEncoder::VALUE_KEY]); |
|
20 | } |
||
21 | } |
||
22 |