Passed
Push — develop ( ec1e42...80559e )
by Brent
03:22
created

AbstractVariable::parse()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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