SearchForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 23
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

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