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 ( 3f218c...4f68bc )
by Carlos Luis
01:55
created

ContextHelper::forbiddenKeys()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace crojasaragonez\LightService;
6
7
class ContextHelper
8
{
9 24
    public static function missingKeys(array $expected_keys, array $context)
10
    {
11 24
        $diff = array_diff($expected_keys, array_keys($context));
12 24
        return join(array_values($diff), ', ');
0 ignored issues
show
Bug introduced by
', ' of type string is incompatible with the type array expected by parameter $pieces of join(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
        return join(array_values($diff), /** @scrutinizer ignore-type */ ', ');
Loading history...
Bug introduced by
array_values($diff) of type array is incompatible with the type string expected by parameter $glue of join(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
        return join(/** @scrutinizer ignore-type */ array_values($diff), ', ');
Loading history...
13
    }
14
15 21
    public static function forbiddenKeys(array $forbidden_keys, array $current_keys)
16
    {
17 21
        $diff = array_intersect($forbidden_keys, $current_keys);
18 21
        return join(array_values($diff), ', ');
0 ignored issues
show
Bug introduced by
array_values($diff) of type array is incompatible with the type string expected by parameter $glue of join(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
        return join(/** @scrutinizer ignore-type */ array_values($diff), ', ');
Loading history...
Bug introduced by
', ' of type string is incompatible with the type array expected by parameter $pieces of join(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
        return join(array_values($diff), /** @scrutinizer ignore-type */ ', ');
Loading history...
19
    }
20
21 18
    public static function removeReservedKeys(array $reserved_keys, array $context)
22
    {
23 18
        return array_diff_key($context, array_flip($reserved_keys));
24
    }
25
}
26