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.

Metadata   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 39
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMeta() 0 4 1
A serialize() 0 4 1
A deserialize() 0 4 1
1
<?php
2
namespace SmoothPhp\Domain;
3
4
use SmoothPhp\Contracts\Serialization\Serializable;
5
6
/**
7
 * Class Metadata
8
 * @package SmoothPhp\Domain
9
 * @author Simon Bennett <[email protected]>
10
 */
11
final class Metadata implements Serializable
12
{
13
    /** @var array */
14
    private $meta;
15
16
    /**
17
     * Metadata constructor.
18
     * @param array $meta
19
     */
20 36
    public function __construct(array $meta = [])
21
    {
22 36
        $this->meta = $meta;
23 36
    }
24
25
    /**
26
     * @return array
27
     */
28 3
    public function getMeta()
29
    {
30 3
        return $this->meta;
31
    }
32
33
    /**
34
     * @return array
35
     */
36 3
    public function serialize()
37
    {
38 3
        return $this->meta;
39
    }
40
41
    /**
42
     * @param array $data
43
     * @return static
44
     */
45 3
    public static function deserialize(array $data)
46
    {
47 3
        return new static($data);
48
    }
49
}