SsrFactory::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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