Completed
Push — master ( eb04a4...cf4b83 )
by Dmitry
11:42
created

FakeEndpoint   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromConfig() 0 6 1
A getConfig() 0 4 1
1
<?php
2
3
namespace hiapi\tests\unit\Endpoints\support;
4
5
use hiapi\endpoints\EndpointConfigurationInterface;
6
7
class FakeEndpoint
8
{
9
    /**
10
     * @var \ArrayAccess
11
     */
12
    private $config;
13
14
    public static function fromConfig(EndpointConfigurationInterface $config)
15
    {
16
        $self = new self();
17
        $self->config = $config;
18
        return $self;
19
    }
20
21
    public function getConfig(): \ArrayAccess
22
    {
23
        return $this->config;
24
    }
25
}
26