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.

JobCollection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 90%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 4
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2015-07-29
7
 *
8
 */
9
10
11
namespace Chapi\Entity\Chronos;
12
13
use Chapi\Entity\Chronos\ChronosJobEntity;
14
use Chapi\Entity\JobEntityInterface;
15
16
class JobCollection extends \ArrayObject
17
{
18
19
    /**
20
     * (PHP 5 &gt;= 5.0.0)<br/>
21
     * Construct a new array object
22
     * @link http://php.net/manual/en/arrayobject.construct.php
23
     *
24
     * @param ChronosJobEntity[] $jobEntities The input parameter accepts an array of \Chapi\Entity\Chronos\JobEntity.
25
     * @throws \InvalidArgumentException
26
     */
27 27
    public function __construct(array $jobEntities)
28
    {
29 27
        $jobs = [];
30
31 27
        if (count($jobEntities) > 0) {
32 24
            $check = current($jobEntities);
33 24
            if (!$check instanceof JobEntityInterface) {
34
                throw new \InvalidArgumentException('array has to contain JobEntity objects');
35
            }
36
37 24
            foreach ($jobEntities as $jobEntity) {
38 24
                $jobs[$jobEntity->getKey()] = $jobEntity;
39
            }
40
        }
41 27
        parent::__construct($jobs);
42 27
    }
43
}
44