These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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
|
|||
26 | return app(ConverterManager::class)->driver($driver); |
||
27 | } |
||
28 | } |
||
29 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.