Completed
Push — master ( 0820ba...224783 )
by ARCANEDEV
8s
created

helpers.php ➔ currency_converter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
use Arcanedev\Currencies\Contracts\ConverterManager;
4
use Arcanedev\Currencies\Contracts\CurrencyManager;
5
6
if ( ! function_exists('currency_manager')) {
7
    /**
8
     * Get the Currency Manager instance.
9
     *
10
     * @return \Arcanedev\Currencies\Contracts\CurrencyManager
11
     */
12
    function currency_manager() {
13
        return app(CurrencyManager::class);
14
    }
15
}
16
17
if ( ! function_exists('currency_converter')) {
18
    /**
19
     * Get the Currency Converter instance (service).
20
     *
21
     * @param  string|null  $driver
22
     *
23
     * @return \Arcanedev\Currencies\Contracts\Services\CurrencyService
24
     */
25
    function currency_converter($driver = null) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
26
        return app(ConverterManager::class)->driver($driver);
27
    }
28
}
29