CurrencyComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 6 1
1
<?php
2
3
namespace App\Http\ViewComposers;
4
5
6
use Illuminate\Contracts\View\View;
7
use File;
8
9
class CurrencyComposer extends Composer
10
{
11
12
13
    public function compose(View $view)
14
    {
15
        $currency = json_decode(File::get(storage_path('app/json_currency.json')));
16
17
        return $view->with(['euro'=>$currency->EUR,'usd'=>$currency->USD]);
18
    }
19
}