MemberController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Member;
6
use Illuminate\Support\Facades\Request;
7
use Illuminate\Support\Facades\Response;
8
9
/**
10
 * Class MemberController
11
 * @package App\Http\Controllers
12
 */
13 View Code Duplication
class MemberController extends Controller
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    /**
16
     * Display a listing of the resource.
17
     *
18
     * @return Response
19
     */
20
    public function index()
21
    {
22
        $members = Member::all();
23
24
        return view('member.index', compact('members'));
25
    }
26
27
    /**
28
     * Store a newly created resource in storage.
29
     *
30
     * @return Response
31
     */
32
    public function store()
33
    {
34
        Member::create(Request::all());
0 ignored issues
show
Bug introduced by
The method create() does not exist on App\Member. Did you maybe mean created()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
35
36
        return redirect('member');
37
    }
38
}
39