Completed
Push — master ( 9e4d7b...c3f58e )
by Gabriel
03:57 queued 11s
created

HasFormTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setForm() 0 5 1
A getForm() 0 3 1
1
<?php
2
3
namespace Nip\Form\Renderer\Traits;
4
5
use Nip\Form\AbstractForm;
6
use Nip\Form\Renderer\AbstractRenderer;
7
8
/**
9
 * Trait HasFormTrait
10
 * @package Nip\Form\Renderer\Traits
11
 */
12
trait HasFormTrait
13
{
14
    protected $form;
15
16
    /**
17
     * @return AbstractForm
18
     */
19 2
    public function getForm()
20
    {
21 2
        return $this->form;
22
    }
23
24
    /**
25
     * @param AbstractForm $form
26
     * @return $this
27
     */
28 10
    public function setForm(AbstractForm $form)
29
    {
30 10
        $this->form = $form;
31
32 10
        return $this;
33
    }
34
}
35