Passed
Pull Request — dev (#2038)
by Janko
10:55
created

SkillEnhancement   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 4 1
A getPosition() 0 4 1
A getType() 0 4 1
A getExpertise() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Entity;
9
use Doctrine\ORM\Mapping\GeneratedValue;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\Table;
12
use Doctrine\ORM\Mapping\UniqueConstraint;
13
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...
14
use Stu\Component\Crew\CrewPositionEnum;
15
use Stu\Component\Crew\Skill\SkillEnhancementEnum;
16
use Stu\Orm\Repository\SkillEnhancementRepository;
17
18
#[Table(name: 'stu_skill_enhancement')]
19
#[Entity(repositoryClass: SkillEnhancementRepository::class)]
20
#[UniqueConstraint(name: 'skill_enhancement_unique_idx', columns: ['type', 'position'])]
21
class SkillEnhancement implements SkillEnhancementInterface
22
{
23
    #[Id]
24
    #[Column(type: 'integer')]
25
    #[GeneratedValue(strategy: 'IDENTITY')]
26
    private int $id;
0 ignored issues
show
introduced by
The private property $id is not used, and could be removed.
Loading history...
27
28
    #[Column(type: 'smallint', enumType: SkillEnhancementEnum::class)]
29
    private SkillEnhancementEnum $type;
30
31
    #[Column(type: 'smallint', enumType: CrewPositionEnum::class)]
32
    private CrewPositionEnum $position;
33
34
    #[Column(type: 'integer')]
35
    private int $expertise;
36
37
    #[Column(type: 'string')]
38
    private string $description;
39
40
    #[Override]
41
    public function getType(): SkillEnhancementEnum
42
    {
43
        return $this->type;
44
    }
45
46
    #[Override]
47
    public function getPosition(): CrewPositionEnum
48
    {
49
        return $this->position;
50
    }
51
52
    #[Override]
53
    public function getExpertise(): int
54
    {
55
        return $this->expertise;
56
    }
57
58
    #[Override]
59
    public function getDescription(): string
60
    {
61
        return $this->description;
62
    }
63
}
64