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.

InSet::appliesTo()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
/**
3
 * Copyright (c) 2016, HelloFresh GmbH.
4
 * All rights reserved.
5
 *
6
 * This source code is licensed under the MIT license found in the
7
 * LICENSE file in the root directory of this source tree.
8
 */
9
10
namespace HelloFresh\FeatureToggle\Operator;
11
12
use Collections\VectorInterface;
13
14
/**
15
 * Operator that compare the given argument on equality based on a value.
16
 */
17
class InSet implements OperatorInterface
18
{
19
    private $values;
20
21
    /**
22
     * @param VectorInterface $values
23
     */
24 8
    public function __construct(VectorInterface $values)
25
    {
26 8
        $this->values = $values;
27 8
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 6
    public function appliesTo($argument)
33
    {
34 6
        return null !== $argument
35 6
        && in_array($argument, $this->values->toArray());
36
    }
37
38
    /**
39
     * @return VectorInterface
40
     */
41 2
    public function getValues()
42
    {
43 2
        return $this->values;
44
    }
45
}
46