Test Failed
Pull Request — master (#5)
by Joao
01:55
created

Literal::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * User: jg
4
 * Date: 30/03/17
5
 * Time: 22:26
6
 */
7
8
namespace ByJG\MicroOrm;
9
10
class Literal
11
{
12
    protected $literalValue;
13
14
    /**
15
     * Literal constructor.
16
     *
17
     * @param $literalValue
18
     */
19 6
    public function __construct($literalValue)
20
    {
21 6
        $this->literalValue = $literalValue;
22 6
    }
23
24
    /**
25
     * @return mixed
26
     */
27 6
    public function getLiteralValue()
28
    {
29 6
        return $this->literalValue;
30
    }
31
32
    /**
33
     * @param mixed $literalValue
34
     */
35
    public function setLiteralValue($literalValue)
36
    {
37
        $this->literalValue = $literalValue;
38
    }
39
40
    public function __toString()
41
    {
42
        return $this->getLiteralValue();
43
    }
44
}
45