Passed
Push — develop ( 37d230...30ebd1 )
by Brent
03:14
created

AbstractVariable::unparsed()   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 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stitcher\Variable;
4
5
abstract class AbstractVariable
6
{
7
    protected $unparsed;
8
    protected $parsed = null;
9
10
    public abstract function parse(): AbstractVariable;
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
11
12 34
    public function __construct($unparsed)
13
    {
14 34
        $this->unparsed = $unparsed;
15 34
    }
16
17
    /**
18
     * @return mixed
19
     */
20
    public function getUnparsed()
21
    {
22
        return $this->unparsed;
23
    }
24
25
    /**
26
     * @return mixed
27
     */
28 33
    public function getParsed()
29
    {
30 33
        if (! $this->parsed) {
31 29
            $this->parse();
32
        }
33
34 33
        return $this->parsed;
35
    }
36
}
37