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.

VideoStatus   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 8
c 1
b 0
f 1
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fromArray() 0 5 2
1
<?php
2
3
namespace ApiVideo\Client\Model;
4
5
final class VideoStatus
6
{
7
    /** @var IngestStatus|null */
8
    public $ingest;
9
10
    /** @var EncodingStatus */
11
    public $encoding;
12
13
    /**
14
     * VideoStatus constructor.
15
     * @param IngestStatus|null   $ingest
16
     * @param EncodingStatus $encoding
17
     */
18
    public function __construct(IngestStatus $ingest = null, EncodingStatus $encoding)
19
    {
20
        $this->ingest   = $ingest;
21
        $this->encoding = $encoding;
22
    }
23
24
    /**
25
     * @param array $data
26
     * @return VideoStatus
27
     */
28
    public static function fromArray(array $data)
29
    {
30
        return new self(
31
            (array() === $data['ingest']) ? null : IngestStatus::fromArray($data['ingest']),
32
            EncodingStatus::fromArray($data['encoding'])
33
        );
34
    }
35
}
36