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

PlayerMethodsTrait::setPlayer()   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
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Traits\Entity\Player;
4
5
use VideoGamesRecords\CoreBundle\Entity\Player;
6
7
trait PlayerMethodsTrait
8
{
9
    /**
10
     * @param Player $player
11
     * @return $this
12
     */
13
    public function setPlayer(Player $player): static
14
    {
15
        $this->player = $player;
0 ignored issues
show
Bug Best Practice introduced by
The property player 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 player
21
     *
22
     * @return Player
23
     */
24
    public function getPlayer(): Player
25
    {
26
        return $this->player;
27
    }
28
}
29