Completed
Pull Request — master (#612)
by
unknown
02:51
created

Formula   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 31
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getXml() 0 4 1
1
<?php
2
3
namespace Box\Spout\Writer\XLSX;
4
5
/**
6
 * Class Formula
7
 *
8
 * @package Box\Spout\Reader\XLSX
9
 */
10
class Formula
11
{
12
13
14
    /**
15
     * @var string
16
     */
17
    protected $formula;
18
19
    /**
20
     * @var string
21
     */
22
    protected $value = '0';
23
24
    /**
25
     * Formula constructor.
26
     * @param string $formula
27
     * @param string $value
28
     */
29 1
    public function __construct($formula, $value = '0')
30
    {
31 1
        $this->formula = $formula;
32 1
        $this->value = $value;
33 1
    }
34
35 1
    public function getXml()
36
    {
37 1
        return '><f>' . $this->formula . '</f><v>' . $this->value . '</v></c>';
38
    }
39
40
}