Context   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 3 1
A getList() 0 3 1
A set() 0 3 1
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