Form::getMethod()   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 Form
8
{
9
    private $fields = [];
10
    private $method;
11
    private $action;
12
    
13
    public function addField(FormField $field)
14
    {
15
        $this->fields[] = $field;
16
    }
17
18
    public function getFields()
19
    {
20
        return $this->fields;
21
    }
22
23
    public function setMethod($method)
24
    {
25
        $this->method = $method;
26
    }
27
28
    public function getMethod()
29
    {
30
        return $this->method;
31
    }
32
33
    public function setAction($action)
34
    {
35
        $this->action = $action;
36
    }
37
38
    public function getAction()
39
    {
40
        return $this->action;
41
    }
42
}
43