Passed
Push — develop ( 0f5d99...ddb92e )
by BENARD
04:38
created

GameMethodsTrait::setGame()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Model\Entity\Game;
4
5
use VideoGamesRecords\CoreBundle\Entity\Game;
6
7
trait GameMethodsTrait
8
{
9
    /**
10
     * @param Game $game
11
     * @return $this
12
     */
13
    public function setGame(Game $game): static
14
    {
15
        $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...
16
        return $this;
17
    }
18
19
    /**
20
     * Get game
21
     *
22
     * @return Game
23
     */
24
    public function getGame(): Game
25
    {
26
        return $this->game;
27
    }
28
}
29