Context::set()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Wcomnisky\Flagship\Context;
6
7
class Context implements ContextInterface
8
{
9
    private $contextList = [];
10
11
    /**
12
     * {@inheritDoc}
13
     */
14 1
    public function add(string $key, string $value): void
15
    {
16 1
        $this->contextList[$key] = $value;
17 1
    }
18
19
    /**
20
     * {@inheritDoc}
21
     */
22 2
    public function set(array $context): void
23
    {
24 2
        $this->contextList = $context;
25 2
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30 1
    public function getList(): array
31
    {
32 1
        return $this->contextList;
33
    }
34
}
35