Completed
Branch master (5acf81)
by Steevan
04:21
created

CurrencyTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCurrency() 0 4 1
A getCurrency() 0 4 1
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\OptionsBuilder\Behavior;
4
5
use steevanb\SymfonyFormOptionsBuilder\Behavior\OptionAccessorsTrait;
6
7
trait CurrencyTrait
8
{
9
    use OptionAccessorsTrait;
10
11
    /**
12
     * @param false|string $currency
13
     * @return $this
14
     * @link http://symfony.com/doc/current/reference/forms/types/money.html#currency
15
     */
16
    public function setCurrency($currency)
17
    {
18
        return $this->setOption('currency', $currency);
19
    }
20
21
    /**
22
     * @return false|string
23
     */
24
    public function getCurrency()
25
    {
26
        return $this->getOption('currency');
27
    }
28
}
29