Passed
Push — develop ( faa3f8...82f9ab )
by Francisco
03:19
created

ExchangeController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace App\Http\Controllers\Admin;
4
5
use Illuminate\Support\Facades\DB;
6
use App\Http\Controllers\Controller;
7
use App\Judite\Contracts\Registry\ExchangeRegistry;
8
9
class ExchangeController extends Controller
10
{
11
    /**
12
     * Display a listing of the resource.
13
     *
14
     * @return \Illuminate\Http\Response
15
     */
16
    public function index(ExchangeRegistry $exchangeLogger)
17
    {
18
        $history = DB::transaction(function () use ($exchangeLogger) {
19
            return $exchangeLogger->paginate();
20
        });
21
22
        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...
23
    }
24
}
25