Passed
Push — task/3376-TYPO3_12_compatibili... ( b42ab1...4e0f1e )
by Rafael
49:28 queued 04:28
created

FormEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSearch() 0 3 1
A getAdditionalFilters() 0 3 1
A getPluginNamespace() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the TYPO3 CMS project.
7
 *
8
 * It is free software; you can redistribute it and/or modify it under
9
 * the terms of the GNU General Public License, either version 2
10
 * of the License, or any later version.
11
 *
12
 * For the full copyright and license information, please read the
13
 * LICENSE.txt file that was distributed with this source code.
14
 *
15
 * The TYPO3 project - inspiring people to share!
16
 */
17
18
namespace ApacheSolrForTypo3\Solr\Event\Search;
19
20
use ApacheSolrForTypo3\Solr\Search;
21
22
/**
23
 * This event is triggered before setting the form values
24
 *
25
 * @author Lars Tode <[email protected]>
26
 */
27
final class FormEvent
28
{
29
    private Search $search;
30
    private array $additionalFilters;
31
    private string $pluginNamespace;
32
33
    /**
34
     * @param Search $search
35
     * @param array $additionalFilters
36
     * @param string $pluginNamespace
37
     */
38
    public function __construct(Search $search, array $additionalFilters, string $pluginNamespace)
39
    {
40
        $this->search = $search;
41
        $this->additionalFilters = $additionalFilters;
42
        $this->pluginNamespace = $pluginNamespace;
43
    }
44
45
    /**
46
     * @return Search
47
     */
48
    public function getSearch(): Search
49
    {
50
        return $this->search;
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public function getAdditionalFilters(): array
57
    {
58
        return $this->additionalFilters;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getPluginNamespace(): string
65
    {
66
        return $this->pluginNamespace;
67
    }
68
}
69