Passed
Push — develop ( dbe277...ea1e27 )
by Francisco
02:33
created

ExchangeController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 7 1
1
<?php
2
3
namespace App\Http\Controllers\Admin;
4
5
use Illuminate\Http\Request;
6
use App\Http\Controllers\Controller;
7
use App\Judite\Contracts\ExchangeLogger;
8
use App\Judite\Models\Enrollment;
9
use Illuminate\Support\Facades\DB;
10
11
class ExchangeController extends Controller
12
{
13
    /**
14
     * Display a listing of the resource.
15
     *
16
     * @return \Illuminate\Http\Response
17
     */
18
    public function index(ExchangeLogger $exchangeLogger)
19
    {
20
        $history = DB::transaction(function () use ($exchangeLogger) {
21
            return $exchangeLogger->history();
22
        });
23
24
        return view('exchanges.index', compact('history'));
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('exchanges.i...x', compact('history')) returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
25
    }
26
}
27