CurrencyManager::getCurrencies()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LaravelCryptoStats\Services;
4
5
trait CurrencyManager
6
{
7
    /**
8
     * Service config instance.
9
     *
10
     * @var array
11
     */
12
    protected $config;
13
14
    /**
15
     * Cryptocurrency of the created instance.
16
     *
17
     * @var string
18
     */
19
    protected $currency;
20
21
    /**
22
     * Return the list of the cryptocurrencies defined n the config.
23
     *
24
     * @return array
25
     */
26
    public function getCurrencies()
27
    {
28
        return $this->config['currencies'];
29
    }
30
31
    /**
32
     * Set the value of the $currency variable.
33
     *
34
     * @param string $currency
35
     */
36
    public function setCurrency($currency)
37
    {
38
        $this->currency = $currency;
39
    }
40
}
41