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.
Passed
Push — master ( 8846c9...67b391 )
by 12345
39s
created

PlaceholderBag   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 33
ccs 6
cts 9
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 6 1
A clear() 0 4 1
A all() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace espend\Behat\PlaceholderExtension;
5
6
use espend\Behat\PlaceholderExtension\Utils\PlaceholderUtil;
7
8
/**
9
 * @author Daniel Espendiller <[email protected]>
10
 */
11
class PlaceholderBag implements PlaceholderBagInterface
12
{
13
    /**
14
     * @var array
15
     */
16
    private $placeholder = [];
17
18
    /**
19
     * {@inheritdoc}
20
     */
21 14
    public function add(string $placeholder, string $value)
22
    {
23 14
        PlaceholderUtil::isValidPlaceholderOrThrowException($placeholder);
24
25 14
        $this->placeholder[$placeholder] = $value;
26 14
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function clear()
32
    {
33
        $this->placeholder = [];
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 11
    public function all(): array
40
    {
41 11
        return $this->placeholder;
42
    }
43
}