Completed
Push — develop ( a9ad07...41d6b2 )
by Verlhac
03:06
created

Player::getPlayer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Model;
4
5
use VideoGamesRecords\CoreBundle\Entity\Player as PlayerEntity;
6
7
trait Player
8
{
9
    /**
10
     * @var PlayerEntity
11
     *
12
     * @ORM\ManyToOne(targetEntity="VideoGamesRecords\CoreBundle\Entity\Player")
13
     * @ORM\JoinColumns({
14
     *   @ORM\JoinColumn(name="idPlayer", referencedColumnName="idPlayer")
15
     * })
16
     */
17
    private $player;
18
19
    /**
20
     * Set player
21
     *
22
     * @param PlayerEntity $player
23
     * @return $this
24
     */
25
    public function setPlayer(PlayerEntity $player = null)
26
    {
27
        $this->player = $player;
28
29
        return $this;
30
    }
31
32
    /**
33
     * Get player
34
     *
35
     * @return PlayerEntity
36
     */
37
    public function getPlayer()
38
    {
39
        return $this->player;
40
    }
41
}
42