CustomMessageController::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
ccs 0
cts 6
cp 0
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Alive2212\LaravelMessageService\Http\Controllers;
4
5
use Alive2212\LaravelMessageService\Http\Controllers\Controller;
6
use Alive2212\LaravelMessageService\Message;
7
use Illuminate\Http\Request;
8
9
class CustomMessageController extends Controller
10
{
11
    protected $model;
12
13
    public function __construct()
14
    {
15
        $this->model = new Message();
16
        $this->middleware([
17
//            'auth:api',
18
        ]);
19
    }
20
21
    public function index(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

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

Loading history...
22
    {
23
        return "I am most powerful man in Dokhan";
24
//        $userId = auth()->id();
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
25
    }
26
27
    public function store(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

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

Loading history...
28
    {
29
//        $userId = auth()->id();
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30
    }
31
}