InMemoryDriver   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A check() 0 3 1
A __construct() 0 3 1
A instance() 0 3 1
A connect() 0 3 1
1
<?php
2
/**
3
 * This file is part of the EventStoreManager package.
4
 *
5
 * (c) Mauro Cassani<https://github.com/mauretto78>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace SimpleEventStoreManager\Infrastructure\Drivers;
12
13
use SimpleEventStoreManager\Infrastructure\Drivers\Contracts\DriverInterface;
14
15
class InMemoryDriver implements DriverInterface
16
{
17
    /**
18
     * InMemoryDriver constructor.
19
     */
20
    public function __construct()
21
    {
22
        $this->connect();
23
    }
24
25
    /**
26
     * @codeCoverageIgnore
27
     *
28
     * @return bool
29
     */
30
    public function check()
31
    {
32
        return true;
33
    }
34
35
    /**
36
     * @return bool
37
     */
38
    public function connect()
39
    {
40
        return true;
41
    }
42
43
    /**
44
     * @return mixed
45
     */
46
    public function instance()
47
    {
48
        return $this;
49
    }
50
}
51