EveMemberCorporation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 59
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCorporationId() 0 4 1
A getStartDate() 0 4 1
A getAlliance() 0 4 1
A __construct() 0 10 1
1
<?php
2
namespace Tarioch\EveapiFetcherBundle\Entity;
3
4
use Doctrine\ORM\Mapping as ORM;
5
6
/**
7
 * @ORM\Entity
8
 * @ORM\Table(name="eveMemberCorporation")
9
 */
10
class EveMemberCorporation
11
{
12
    /**
13
     * @ORM\Id @ORM\Column(name="corporationID", type="bigint", options={"unsigned"=true})
14
     */
15
    private $corporationId;
16
17
    /**
18
     * @ORM\Column(name="startDate", type="datetime")
19
     */
20
    private $startDate;
21
22
    /**
23
     * @ORM\ManyToOne(targetEntity="EveAlliance", fetch="EAGER", inversedBy="memberCorporations")
24
     * @ORM\JoinColumn(name="allianceID", referencedColumnName="allianceID", nullable=false, onDelete="cascade")
25
     */
26
    private $alliance;
27
28
    public function __construct(
29
        $corporationId,
30
        $startDate,
31
        EveAlliance $alliance
32
    ) {
33
        $this->corporationId = $corporationId;
34
        $this->startDate = $startDate;
35
        $this->alliance = $alliance;
36
        $this->alliance->addMemberCorp($this);
37
    }
38
39
    /**
40
     * Get corporationId
41
     *
42
     * @return integer
43
     */
44
    public function getCorporationId()
45
    {
46
        return $this->corporationId;
47
    }
48
49
    /**
50
     * Get startDate
51
     *
52
     * @return \DateTime
53
     */
54
    public function getStartDate()
55
    {
56
        return $this->startDate;
57
    }
58
59
    /**
60
     * Get alliance
61
     *
62
     * @return \Tarioch\EveapiFetcherBundle\Entity\EveAlliance
63
     */
64
    public function getAlliance()
65
    {
66
        return $this->alliance;
67
    }
68
}
69