Completed
Push — master ( a6b8e3...7bff93 )
by Brent
01:25
created

LogNonGetRequests::shouldLogRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Spatie\HttpLogger;
4
5
use Illuminate\Http\Request;
6
7
class LogNonGetRequests implements LogProfile
8
{
9
    public function shouldLogRequest(Request $request): bool
10
    {
11
        return in_array(strtolower($request->method()), ['post', 'put', 'patch', 'delete']);
12
    }
13
}
14