MockContainer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 34
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 4 1
A has() 0 4 1
1
<?php
2
3
namespace SteffenBrand\HtmlCompressMiddleware\Test\Mock;
4
5
use Psr\Container\ContainerInterface;
6
7
/**
8
 * Class MockContainer
9
 * @package SteffenBrand\HtmlCompressMiddleware\Test\Mock
10
 */
11
class MockContainer implements ContainerInterface
12
{
13
    /**
14
     * @var bool
15
     */
16
    private $debugValue;
17
18
    /**
19
     * MockContainer constructor.
20
     * @param bool $debugValue
21
     */
22
    public function __construct(bool $debugValue)
23
    {
24
        $this->debugValue = $debugValue;
25
    }
26
27
    /**
28
     * @param string $id
29
     * @return array|mixed
30
     */
31
    public function get($id)
32
    {
33
        return ['debug' => $this->debugValue];
34
    }
35
36
    /**
37
     * @param string $id
38
     * @return bool
39
     */
40
    public function has($id)
41
    {
42
        return true;
43
    }
44
}