Completed
Push — master ( c087ad...47fff7 )
by Benedikt
02:33
created

Player   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 90
c 0
b 0
f 0
rs 10
wmc 7
lcom 0
cbo 1

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getBirthday() 0 4 1
A getFirstName() 0 4 1
A getLastName() 0 4 1
A getPlayerId() 0 4 1
A setBirthday() 0 4 1
A setFirstName() 0 4 1
A setLastName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Created by PhpStorm.
5
 * User: benedikt
6
 * Date: 9/17/17
7
 * Time: 10:27 AM
8
 */
9
10
namespace Tfboe\FmLib\Entity\Traits;
11
12
13
use Doctrine\ORM\Mapping as ORM;
14
use Tfboe\FmLib\Entity\Helpers\TimestampableEntity;
15
16
17
/**
18
 * Trait Player
19
 * @package Tfboe\FmLib\Entity
20
 */
21
trait Player
22
{
23
  use TimestampableEntity;
24
25
//<editor-fold desc="Fields">
26
  /**
27
   * @ORM\Id
28
   * @ORM\GeneratedValue
29
   * @ORM\Column(type="integer")
30
   * @var int
31
   */
32
  private $playerId;
33
34
  /**
35
   * @ORM\Column(type="string", nullable=false)
36
   * @var string
37
   */
38
  private $firstName;
39
40
  /**
41
   * @ORM\Column(type="string", nullable=false)
42
   * @var string
43
   */
44
  private $lastName;
45
46
  /**
47
   * @ORM\Column(type="date", nullable=true)
48
   * @var \DateTime
49
   */
50
  private $birthday;
51
//</editor-fold desc="Fields">
52
53
//<editor-fold desc="Public Methods">
54
  /**
55
   * @return \DateTime
56
   */
57
  public function getBirthday(): \DateTime
58
  {
59
    return $this->birthday;
60
  }
61
62
  /**
63
   * @return string
64
   */
65
  public function getFirstName(): string
66
  {
67
    return $this->firstName;
68
  }
69
70
  /**
71
   * @return string
72
   */
73
  public function getLastName(): string
74
  {
75
    return $this->lastName;
76
  }
77
78
  /**
79
   * @return int
80
   */
81
  public function getPlayerId(): int
82
  {
83
    return $this->playerId;
84
  }
85
86
  /**
87
   * @param \DateTime $birthday
88
   */
89
  public function setBirthday(\DateTime $birthday)
90
  {
91
    $this->birthday = $birthday;
92
  }
93
94
  /**
95
   * @param string $firstName
96
   */
97
  public function setFirstName(string $firstName)
98
  {
99
    $this->firstName = $firstName;
100
  }
101
102
  /**
103
   * @param string $lastName
104
   */
105
  public function setLastName(string $lastName)
106
  {
107
    $this->lastName = $lastName;
108
  }
109
//</editor-fold desc="Public Methods">
110
}