Completed
Pull Request — master (#2015)
by Basil
02:18
created

PriceValue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace luya\web\jsonld;
4
5
/**
6
 * The price accepted.
7
 *
8
 * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
9
 *
10
 * @author Basil Suter <[email protected]>
11
 * @since 1.2.2
12
 */
13
class PriceValue extends BaseValue
14
{
15
    private $_price;
16
17
    public function __construct($price)
18
    {
19
        $this->_price = $price;
20
    }
21
22
    public function getValue()
23
    {
24
        return str_replace(",", ".", $this->_price);
25
    }
26
}
27