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.

FetchEntity::__construct()   B
last analyzed

Complexity

Conditions 5
Paths 4

Size

Total Lines 12
Code Lines 7

Duplication

Lines 12
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 5.0729

Importance

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