Completed
Push — master ( 038cca...52f893 )
by Sebastian
04:31
created

Form   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 40
rs 10
wmc 4
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A action() 0 4 1
A method() 0 4 1
A novalidate() 0 4 1
A acceptsFiles() 0 4 1
1
<?php
2
3
namespace Spatie\Html\Elements;
4
5
use Spatie\Html\BaseElement;
6
7
class Form extends BaseElement
8
{
9
    protected $tag = 'form';
10
11
    /**
12
     * @param string|null $action
13
     *
14
     * @return static
15
     */
16
    public function action($action)
17
    {
18
        return $this->attribute('action', $action);
19
    }
20
21
    /**
22
     * @param string|null $method
23
     *
24
     * @return static
25
     */
26
    public function method($method)
27
    {
28
        return $this->attribute('method', $method);
29
    }
30
31
    /**
32
     * @return static
33
     */
34
    public function novalidate($method)
0 ignored issues
show
Unused Code introduced by
The parameter $method is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
35
    {
36
        return $this->attribute('novalidate');
37
    }
38
39
    /**
40
     * @return static
41
     */
42
    public function acceptsFiles()
43
    {
44
        return $this->attribute('enctype', 'multipart/form-data');
45
    }
46
}
47