FormBuilder::getResult()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
nc 1
cc 1
eloc 2
nop 0
1
<?php
2
3
namespace Creational\Builder;
4
5
use Creational\Builder\FormField\FormField;
6
7
class FormBuilder
8
{
9
    private $form;
10
    
11
    public function addField(FormField $field)
12
    {
13
        $this->form->addField($field);
14
    }
15
16
    public function getResult()
17
    {
18
        return $this->form;
19
    }
20
21
    public function createForm()
22
    {
23
        $this->form = new Form();
24
    }
25
26
    public function setMethod($method)
27
    {
28
        $this->form->setMethod($method);
29
    }
30
31
    public function setAction($action)
32
    {
33
        $this->form->setAction($action);
34
    }
35
}
36