MoneyFormat::html()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 2
b 0
f 1
nc 1
nop 2
dl 0
loc 5
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace ByTIC\Money\Utility;
4
5
/**
6
 * Class MoneyFormat
7
 * @package ByTIC\Money\Utility
8
 */
9
class MoneyFormat
10
{
11
    /**
12
     * @param $value
13
     * @param $currency
14
     */
15
    public static function html($value, $currency = null)
16
    {
17 1
        $currency = \ByTIC\Money\Money::currency($currency);
18
        $money = \ByTIC\Money\Money::parse($value, $currency);
19 1
        return $money->formatBy('html');
20 1
    }
21
}
22