CheckrController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handleWebHook() 0 7 1
1
<?php
2
3
namespace Lyal\Checkr\Laravel\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
use Illuminate\Routing\Controller;
7
use Lyal\Checkr\Laravel\Helpers\EventHelper;
8
9
class CheckrController extends Controller
10
{
11
    /**
12
     * @param Illuminate\Http\Request $request
0 ignored issues
show
Bug introduced by
The type Lyal\Checkr\Laravel\Http...Illuminate\Http\Request was not found. Did you mean Illuminate\Http\Request? If so, make sure to prefix the type with \.
Loading history...
13
     */
14
    public function handleWebHook(Request $request)
15
    {
16
        $input = $request->all();
17
        $eventHandler = new EventHelper($input);
18
        $eventHandler->dispatch();
19
20
        return response('Webhook received.', 200);
0 ignored issues
show
Bug introduced by
The function response was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

20
        return /** @scrutinizer ignore-call */ response('Webhook received.', 200);
Loading history...
21
    }
22
}
23