SsrFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A newInstance() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * This file is part of the BEAR.SsrModule package.
6
 *
7
 * @license http://opensource.org/licenses/MIT MIT
8
 */
9
namespace BEAR\SsrModule;
10
11
use Koriym\Baracoa\BaracoaInterface;
12
13
final class SsrFactory implements SsrFactoryInterface
14
{
15
    /**
16
     * @var BaracoaInterface
17
     */
18
    private $baracoa;
19
20 5
    public function __construct(BaracoaInterface $baracoa)
21
    {
22 5
        $this->baracoa = $baracoa;
23 5
    }
24
25
    /**
26
     * [@inheritdoc}
27
     */
28 4
    public function newInstance(string $appName, array $stateKeys = [], array $metasKeys = [])
29
    {
30 4
        return new Ssr($this->baracoa, $appName, $stateKeys, $metasKeys);
31
    }
32
}
33