Passed
Push — Firesphere-funding-yml ( ab824b...2bf34e )
by Simon
18:25 queued 11:53
created

SearchForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Forms;
5
6
use SilverStripe\Control\RequestHandler;
7
use SilverStripe\Forms\FieldList;
8
use SilverStripe\Forms\Form;
9
use SilverStripe\Forms\Validator;
10
11
/**
12
 * Class SolrSearchForm
13
 * Basic form to start searching
14
 * @package Firesphere\SolrSearch\Forms
15
 */
16
class SearchForm extends Form
17
{
18
    /**
19
     * SolrSearchForm constructor.
20
     * @param RequestHandler|null $controller
21
     * @param string $name
22
     * @param FieldList|null $fields
23
     * @param FieldList|null $actions
24
     * @param Validator|null $validator
25
     */
26
    public function __construct(
27
        RequestHandler $controller = null,
28
        $name = self::DEFAULT_NAME,
29
        FieldList $fields = null,
30
        FieldList $actions = null,
31
        Validator $validator = null
32
    ) {
33
        parent::__construct($controller, $name, $fields, $actions, $validator);
34
35
        $this->setFormMethod('GET');
36
37
        $this->disableSecurityToken();
38
    }
39
}
40