CheckrController::handleWebHook()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
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