Passed
Pull Request — master (#8)
by
unknown
03:37 queued 48s
created

AttributesResolver   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
c 0
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\Jaravel\Configurations\Guzzle;
6
7
use Psr\Http\Message\RequestInterface;
8
9
class AttributesResolver
10
{
11
    public function __invoke(RequestInterface $request)
12
    {
13
        return [
14
            'type' => 'request',
15
            'uri' => (string) $request->getUri(),
16
            'method' => $request->getMethod(),
17
            'body' => optional($request->getBody())
18
                ->getContents(),
19
        ];
20
    }
21
}
22