Passed
Push — master ( e56b61...098b23 )
by ABDULMALIK
02:21
created

UriPathPermissionNameExtractor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPermissionName() 0 3 1
1
<?php
2
3
namespace Potievdev\SlimRbac\Component\PermissionNameExtractor;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
7
class UriPathPermissionNameExtractor implements PermissionNameExtractor
8
{
9
    /**
10
     * @inheritDoc
11
     */
12
    public function getPermissionName(ServerRequestInterface $request): string
13
    {
14
        return $request->getUri()->getPath();
15
    }
16
}