Test Failed
Push — master ( e7743d...99f6c2 )
by Pavel
02:49
created

ShowRestRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A ability() 0 3 1
1
<?php namespace Pz\LaravelDoctrine\Rest\Request;
2
3
use Pz\Doctrine\Rest\Request\ShowRequestInterface;
4
use Pz\LaravelDoctrine\Rest\RestRequest;
5
6
class ShowRestRequest extends RestRequest implements ShowRequestInterface
7
{
8
    /**
9
     * @inheritdoc
10
     */
11 3
    public function ability()
12
    {
13 3
        return 'show';
14
    }
15
16
    /**
17
     * @return int
18
     */
19 4
    public function getId()
20
    {
21 4
        return (int) $this->route('id');
22
    }
23
}
24