Completed
Branch FET-10619-money-entity (ff52f2)
by
unknown
155:11 queued 144:22
created

CurrencyCodeMoneyFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 14
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 4 1
1
<?php
2
3
namespace EventEspresso\core\services\currency;
4
5
use EventEspresso\core\entities\money\Currency;
6
7
defined('EVENT_ESPRESSO_VERSION') || exit;
8
9
10
11
/**
12
 * Class CurrencyCodeMoneyFormatter
13
 * appends the currency code to the supplied amount
14
 *
15
 * @package       Event Espresso
16
 * @author        Brent Christensen
17
 * @since         $VID:$
18
 */
19
class CurrencyCodeMoneyFormatter implements MoneyFormatter
20
{
21
22
    /**
23
     * @param string   $money_amount
24
     * @param Currency $currency
25
     * @return string
26
     */
27
    public function format($money_amount, Currency $currency)
28
    {
29
        return $money_amount . ' ' . $currency->code();
30
    }
31
32
}
33
// End of file CurrencyCodeMoneyFormatter.php
34
// Location: core/entities/money/CurrencyCodeMoneyFormatter.php