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

PlayerMethodsTrait::getPlayer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Model\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