Completed
Push — master ( 5d7e29...cc6f2d )
by Marcus
02:36
created

AssignProperty::nameHasPrefix()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace LesserPhp\Property;
4
5
/**
6
 * lesserphp
7
 * https://www.maswaba.de/lesserphp
8
 *
9
 * LESS CSS compiler, adapted from http://lesscss.org
10
 *
11
 * Copyright 2013, Leaf Corcoran <[email protected]>
12
 * Copyright 2016, Marcus Schwarz <[email protected]>
13
 * Copyright 2017, Stefan Pöhner <[email protected]>
14
 * Licensed under MIT or GPLv3, see LICENSE
15
 *
16
 * @author  Stefan Pöhner <[email protected]>
17
 *
18
 * @package LesserPhp
19
 */
20
21
class AssignProperty extends \LesserPhp\Property
22
{
23
    /**
24
     * @param string $prefixToCheck Single character to check.
25
     *
26
     * @return bool
27
     */
28
    public function nameHasPrefix($prefixToCheck)
29
    {
30
        return ($this->getName() && $this->getName()[0] === $prefixToCheck);
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getName()
37
    {
38
        return $this->getValue1();
39
    }
40
41
    /**
42
     * @return mixed
43
     */
44
    public function getValue()
45
    {
46
        return $this->getValue2();
47
    }
48
49
    /**
50
     * @param mixed $value
51
     */
52
    public function setValue($value)
53
    {
54
        $this->setValue2($value);
55
    }
56
}
57