GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( a10806...afde92 )
by Cees-Jan
03:04
created

LineDecoder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A decode() 0 12 3
1
<?php
2
3
namespace WyriHaximus\React\ChildProcess\Messenger\Messages;
4
5
use Cake\Utility\Hash;
6
7
final class LineDecoder
8
{
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