Passed
Push — master ( 3eb4db...99d5ff )
by Kirill
03:12
created

NullMemory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 2
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadData() 0 3 1
A saveData() 0 2 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Boot;
13
14
/**
15
 * Nullable memory interface (does not save or load anything).
16
 */
17
final class NullMemory implements MemoryInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function loadData(string $section)
23
    {
24
        return null;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function saveData(string $section, $data): void
31
    {
32
        //Nothing to do
33
    }
34
}
35