GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

SupplierController::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Http\Controllers\API;
4
5
use App\Http\Controllers\Controller;
6
use App\Supplier;
7
use App\Transformers\SupplierTransformer;
8
9
class SupplierController extends Controller
10
{
11
    /**
12
     * SupplierController constructor.
13
     */
14 2
    public function __construct()
15
    {
16 2
        $this->middleware('auth');
17 2
    }
18
19
    /**
20
     * Get all the suppliers.
21
     *
22
     * @return array
23
     */
24 1
    public function all()
25
    {
26 1
        $suppliers = Supplier::orderBy('id', 'desc')->get();
27
28 1
        return fractal()->collection($suppliers, new SupplierTransformer)
29 1
                        ->toArray();
30
    }
31
}
32