AssignProperty   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A nameHasPrefix() 0 4 2
A getName() 0 4 1
A getValue() 0 4 1
A setValue() 0 4 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