Completed
Branch v1.x-dev (b0683a)
by Benjamin
08:17
created

RuleTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRule() 0 3 1
A setRule() 0 5 1
1
<?php
2
3
namespace Obblm\Core\Entity\Traits;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Obblm\Core\Entity\Rule;
7
8
trait RuleTrait
9
{
10
    /**
11
     * @ORM\ManyToOne(targetEntity=Rule::class, inversedBy="teams")
12
     */
13
    private $rule;
14
15 3
    public function getRule(): ?Rule
16
    {
17 3
        return $this->rule;
18
    }
19
20 3
    public function setRule(?Rule $rule): self
21
    {
22 3
        $this->rule = $rule;
23
24 3
        return $this;
25
    }
26
}
27