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.

JobFilterComposite   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 31
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isInteresting() 0 10 3
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2017-03-01
7
 *
8
 */
9
10
namespace Chapi\Service\JobRepository\Filter;
11
12
use Chapi\Entity\JobEntityInterface;
13
14
class JobFilterComposite implements JobFilterInterface
15
{
16
    /**
17
     * @var JobFilterInterface[]
18
     */
19
    private $filters = [];
20
21
    /**
22
     * JobFilterComposite constructor.
23
     * @param JobFilterInterface[] $filters
24
     */
25
    public function __construct($filters)
26
    {
27
        $this->filters = $filters;
28
    }
29
30
    /**
31
     * @param JobEntityInterface $jobEntity
32
     * @return bool
33
     */
34
    public function isInteresting(JobEntityInterface $jobEntity)
35
    {
36
        foreach ($this->filters as $filter) {
37
            if (!$filter->isInteresting($jobEntity)) {
38
                return false;
39
            }
40
        }
41
42
        return true;
43
    }
44
}
45