Passed
Push — master ( 22152a...8c8825 )
by Walter
28s
created

EmptyStorage::clear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace PhpAbTestAsset;
4
5
use PhpAb\TestInterface;
6
use PhpAb\Storage\StorageInterface;
7
8
class EmptyStorage implements StorageInterface
9
{
10
    private $choice;
11
12
    public function __construct($choice = null)
13
    {
14
        $this->choice = $choice;
15
    }
16
17
    public function clear(TestInterface $test)
18
    {
19
        $this->choice = null;
20
    }
21
22
    public function read(TestInterface $test)
23
    {
24
        return $this->choice;
25
    }
26
27
    public function write(TestInterface $test, $choice)
28
    {
29
        $this->choice = $choice;
30
    }
31
}
32