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
Pull Request — master (#23)
by Malcolm
04:22 queued 02:10
created

AbstractTokenBody::getDefaultOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Emarref\Jwt\Token;
4
5
abstract class AbstractTokenBody implements \JsonSerializable
6
{
7
    const OPT_JSON_OPTIONS = 'json_options';
8
9
    /**
10
     * @var PropertyList
11
     */
12
    protected $propertyList;
13
14
    /**
15
     * @param array $options
16
     */
17
    public function __construct(array $options = [])
18
    {
19
        $options = $this->parseOptions($options);
20
21
        $this->propertyList = new PropertyList($options[self::OPT_JSON_OPTIONS]);
22
    }
23
24
    /**
25
     * @param array $options
26
     * @return array
27
     */
28
    protected function parseOptions(array $options)
29
    {
30
        $defaultOptions = $this->getDefaultOptions();
31
32
        return array_merge($defaultOptions, $options);
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    protected function getDefaultOptions()
39
    {
40
        return [
41
            self::OPT_JSON_OPTIONS => null,
42
        ];
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function jsonSerialize()
49
    {
50
        return $this->propertyList->jsonSerialize();
51
    }
52
}
53