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
07:53
created

ContainerVolumeEntity   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 37.84 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 14
loc 37
ccs 7
cts 8
cp 0.875
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 14 14 5

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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
0 ignored issues
show
Coding Style introduced by
The property $unknown_fields is not named in camelCase.

This check marks property names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
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->unknown_fields[$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 $unknown_fields = [];
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