Passed
Pull Request — develop (#8)
by BENARD
03:08
created

Player::getRankMedal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\DwhBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use VideoGamesRecords\DwhBundle\Repository\PlayerRepository;
9
use VideoGamesRecords\DwhBundle\Traits\Entity\DateTrait;
10
use VideoGamesRecords\CoreBundle\Traits as VgrCoreTraits;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBundle\Traits 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...
11
use VideoGamesRecords\DwhBundle\Traits\Entity\NbPostDay;
12
13
#[ORM\Table(name:'dwh_player')]
14
#[ORM\Entity(repositoryClass: PlayerRepository::class)]
15
class Player
16
{
17
    use DateTrait;
18
    use NbPostDay;
19
    use VgrCoreTraits\Entity\ChartRank0Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank0Trait 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...
20
    use VgrCoreTraits\Entity\ChartRank1Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank1Trait 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...
21
    use VgrCoreTraits\Entity\ChartRank2Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank2Trait 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...
22
    use VgrCoreTraits\Entity\ChartRank3Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank3Trait 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...
23
    use VgrCoreTraits\Entity\ChartRank4Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank4Trait 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...
24
    use VgrCoreTraits\Entity\ChartRank5Trait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\ChartRank5Trait 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...
25
    use VgrCoreTraits\Entity\PointChartTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...\Entity\PointChartTrait 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...
26
    use VgrCoreTraits\Entity\RankPointChartTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...ity\RankPointChartTrait 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...
27
    use VgrCoreTraits\Entity\RankMedalTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...s\Entity\RankMedalTrait 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...
28
    use VgrCoreTraits\Entity\NbChartTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...its\Entity\NbChartTrait 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...
29
    use VgrCoreTraits\Entity\PointGameTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...s\Entity\PointGameTrait 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...
30
    use VgrCoreTraits\Entity\RankPointGameTrait;
0 ignored issues
show
Bug introduced by
The type VideoGamesRecords\CoreBu...tity\RankPointGameTrait 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...
31
32
    #[ORM\Id, ORM\Column]
33
    private ?int $id;
34
35
    #[ORM\Column(nullable: false, options: ['default' => 0])]
36
    private int $chartRank6 = 0;
37
38
    #[ORM\Column(nullable: false, options: ['default' => 0])]
39
    private int $chartRank7 = 0;
40
41
    #[ORM\Column(nullable: false, options: ['default' => 0])]
42
    private int $chartRank8 = 0;
43
44
    #[ORM\Column(nullable: false, options: ['default' => 0])]
45
    private int $chartRank9 = 0;
46
47
    #[ORM\Column(nullable: false, options: ['default' => 0])]
48
    private int $chartRank10 = 0;
49
50
    #[ORM\Column(nullable: false, options: ['default' => 0])]
51
    private int $chartRank11 = 0;
52
53
    #[ORM\Column(nullable: false, options: ['default' => 0])]
54
    private int $chartRank12 = 0;
55
56
    #[ORM\Column(nullable: false, options: ['default' => 0])]
57
    private int $chartRank13 = 0;
58
59
    #[ORM\Column(nullable: false, options: ['default' => 0])]
60
    private int $chartRank14 = 0;
61
62
    #[ORM\Column(nullable: false, options: ['default' => 0])]
63
    private int $chartRank15 = 0;
64
65
    #[ORM\Column(nullable: false, options: ['default' => 0])]
66
    private int $chartRank16 = 0;
67
68
    #[ORM\Column(nullable: false, options: ['default' => 0])]
69
    private int $chartRank17 = 0;
70
71
    #[ORM\Column(nullable: false, options: ['default' => 0])]
72
    private int $chartRank18 = 0;
73
74
    #[ORM\Column(nullable: false, options: ['default' => 0])]
75
    private int $chartRank19 = 0;
76
77
    #[ORM\Column(nullable: false, options: ['default' => 0])]
78
    private int $chartRank20 = 0;
79
80
    #[ORM\Column(nullable: false, options: ['default' => 0])]
81
    private int $chartRank21 = 0;
82
83
    #[ORM\Column(nullable: false, options: ['default' => 0])]
84
    private int $chartRank22 = 0;
85
86
    #[ORM\Column(nullable: false, options: ['default' => 0])]
87
    private int $chartRank23 = 0;
88
89
    #[ORM\Column(nullable: false, options: ['default' => 0])]
90
    private int $chartRank24 = 0;
91
92
    #[ORM\Column(nullable: false, options: ['default' => 0])]
93
    private int $chartRank25 = 0;
94
95
    #[ORM\Column(nullable: false, options: ['default' => 0])]
96
    private int $chartRank26 = 0;
97
98
    #[ORM\Column(nullable: false, options: ['default' => 0])]
99
    private int $chartRank27 = 0;
100
101
    #[ORM\Column(nullable: false, options: ['default' => 0])]
102
    private int $chartRank28 = 0;
103
104
    #[ORM\Column(nullable: false, options: ['default' => 0])]
105
    private int $chartRank29 = 0;
106
107
    #[ORM\Column(nullable: false, options: ['default' => 0])]
108
    private int $chartRank30 = 0;
109
110
    public function __toString()
111
    {
112
        return sprintf('%s [%s]', $this->id, $this->id);
113
    }
114
115
    public function getId(): ?int
116
    {
117
        return $this->id;
118
    }
119
120
    public function setId(?int $id): void
121
    {
122
        $this->id = $id;
123
    }
124
125
    public function setChartRank(int $rank, int $nb): void
126
    {
127
        $var = 'chartRank' . $rank;
128
        $this->$var = $nb;
129
    }
130
131
    public function getChartRank(int $rank): int
132
    {
133
        $var = 'chartRank' . $rank;
134
        return $this->$var;
135
    }
136
137
    public function setFromArray(array $row): void
138
    {
139
        foreach ($row as $key => $value) {
140
            $this->$key = $value;
141
        }
142
    }
143
}
144