CustomMessageController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0
ccs 0
cts 13
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A index() 0 5 1
A store() 0 4 1
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
}