DonatorController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
c 0
b 0
f 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A delete() 0 3 1
A index() 0 3 1
A show() 0 3 1
1
<?php
2
3
namespace Diglabby\Doika\Http\Controllers\Dashboard;
4
5
use App\Http\Controllers\Controller;
6
use Diglabby\Doika\Models\Donator;
7
use Illuminate\Http\Response;
8
9
final class DonatorController extends Controller
10
{
11
    public function index()
12
    {
13
        return factory(Donator::class, 10)->make();
14
    }
15
16
    public function show(int $donatorId)
0 ignored issues
show
Unused Code introduced by
The parameter $donatorId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

16
    public function show(/** @scrutinizer ignore-unused */ int $donatorId)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
17
    {
18
        return factory(Donator::class)->make();
19
    }
20
21
    public function delete(int $donatorId)
0 ignored issues
show
Unused Code introduced by
The parameter $donatorId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function delete(/** @scrutinizer ignore-unused */ int $donatorId)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    {
23
        return response()->json([], Response::HTTP_ACCEPTED);
24
    }
25
}
26