Passed
Push — develop ( 4a5a66...90be87 )
by BENARD
04:36
created

GameMethodsTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 20
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getGame() 0 3 1
A setGame() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\CoreBundle\Traits\Entity\Game;
6
7
use VideoGamesRecords\CoreBundle\Entity\Game;
8
9
trait GameMethodsTrait
10
{
11
    /**
12
     * @param Game $game
13
     * @return $this
14
     */
15
    public function setGame(Game $game): static
16
    {
17
        $this->game = $game;
0 ignored issues
show
Bug Best Practice introduced by
The property game does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
18
        return $this;
19
    }
20
21
    /**
22
     * Get game
23
     *
24
     * @return Game
25
     */
26
    public function getGame(): Game
27
    {
28
        return $this->game;
29
    }
30
}
31