Passed
Push — dev ( 737777...096a7e )
by Janko
05:19
created

CreateLicenseRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getWantedLicenseCommodityId() 0 4 1
A getLicenseDays() 0 4 1
A getWantedLicenseAmount() 0 4 1
A getTradePostId() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Trade\Action\CreateLicense;
6
7
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Stu\Lib\Request\CustomControllerHelperTrait;
9
10
final class CreateLicenseRequest implements CreateLicenseRequestInterface
11
{
12
    use CustomControllerHelperTrait;
13
14 1
    #[Override]
15
    public function getTradePostId(): int
16
    {
17 1
        return $this->bodyParameter('postid')->int()->required();
18
    }
19
20 1
    #[Override]
21
    public function getWantedLicenseCommodityId(): int
22
    {
23 1
        return $this->bodyParameter('wlgid')->int()->defaultsTo(0);
24
    }
25
26 1
    #[Override]
27
    public function getWantedLicenseAmount(): int
28
    {
29 1
        return $this->bodyParameter('wlcount')->int()->defaultsTo(0);
30
    }
31
32 1
    #[Override]
33
    public function getLicenseDays(): int
34
    {
35 1
        return $this->bodyParameter('ldays')->int()->defaultsTo(0);
36
    }
37
}
38