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

HasFormTrait::getForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 1
b 1
f 0
cc 1
nc 1
nop 0
crap 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