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 (#104)
by
unknown
03:25
created

ContainerVolumeEntity::__construct()   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 14
Code Lines 9

Duplication

Lines 14
Ratio 100 %

Code Coverage

Tests 7
CRAP Score 5.0488

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 14
loc 14
ccs 7
cts 8
cp 0.875
rs 8.8571
c 1
b 0
f 0
cc 5
eloc 9
nc 4
nop 1
crap 5.0488
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2016-11-04
7
 */
8
9
namespace Chapi\Entity\Chronos\JobEntity;
10
11
class ContainerVolumeEntity
12
{
13
    /**
14
     * @param array|object $jobData
15
     * @throws \InvalidArgumentException
16
     */
17 6 View Code Duplication
    public function __construct($jobData = [])
18
    {
19 6
        if (is_array($jobData) || is_object($jobData)) {
20 6
            foreach ($jobData as $key => $value) {
21 2
                if (property_exists($this, $key)) {
22 1
                    $this->{$key} = $value;
23
                } else {
24 6
                    $this->unknownFields[$key] = $value;
25
                }
26
            }
27
        } else {
28
            throw new \InvalidArgumentException(sprintf('Argument 1 passed to "%s" must be an array or object', __METHOD__));
29
        }
30 6
    }
31
32
    public $unknownFields = [];
33
    
34
    /** @var string  */
35
    public $containerPath = '';
36
37
    /** @var string  */
38
    public $hostPath = '';
39
40
    /**
41
     * @var string
42
     *
43
     * read-write and read-only.
44
     * val RW, RO = Value
45
     */
46
    public $mode = '';
47
}
48