Completed
Push — master ( c9a923...7591c0 )
by Karsten
03:22
created

PsiOptions::setPreserveKeysOfMultipleInputs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * File was created 12.06.2015 09:51
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
8
namespace PeekAndPoke\Component\Psi;
9
10
/**
11
 * @author Karsten J. Gerber <[email protected]>
12
 */
13
class PsiOptions
14
{
15
    /** @var PsiFactory */
16
    private $factory;
17
    /** @var bool */
18
    private $preserveKeysOfMultipleInputs = false;
19
20 108
    public function __construct()
21
    {
22 108
        $this->factory = new DefaultPsiFactory();
23 108
    }
24
25
    /**
26
     * @return PsiFactory
27
     */
28 95
    public function getFactory()
29
    {
30 95
        return $this->factory;
31
    }
32
33
    /**
34
     * @param PsiFactory $factory
35
     *
36
     * @return $this
37
     */
38 1
    public function setFactory(PsiFactory $factory)
39
    {
40 1
        $this->factory = $factory;
41
42 1
        return $this;
43
    }
44
45
    /**
46
     * @return boolean
47
     */
48 15
    public function isPreserveKeysOfMultipleInputs()
49
    {
50 15
        return $this->preserveKeysOfMultipleInputs;
51
    }
52
53
    /**
54
     * @param boolean $preserveKeysOfMultipleInputs
55
     *
56
     * @return $this
57
     */
58 3
    public function setPreserveKeysOfMultipleInputs($preserveKeysOfMultipleInputs)
59
    {
60 3
        $this->preserveKeysOfMultipleInputs = $preserveKeysOfMultipleInputs;
61
62 3
        return $this;
63
    }
64
}
65