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

AfterFrequentlySearchedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 29
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAdditionalFilters() 0 3 1
A __construct() 0 4 1
A getResultSet() 0 3 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\Domain\Search\ResultSet\SearchResultSet;
21
22
/**
23
 * This event is dispatched after the frequently searched was executed.
24
 * It contains the result of that search request.
25
 *
26
 * @author Lars Tode <[email protected]>
27
 */
28
final class AfterFrequentlySearchedEvent
29
{
30
    private SearchResultSet $resultSet;
31
    private array $additionalFilters;
32
33
    /**
34
     * @param SearchResultSet $resultSet
35
     * @param array $additionalFilters
36
     */
37
    public function __construct(SearchResultSet $resultSet, array $additionalFilters)
38
    {
39
        $this->resultSet = $resultSet;
40
        $this->additionalFilters = $additionalFilters;
41
    }
42
43
    /**
44
     * @return SearchResultSet
45
     */
46
    public function getResultSet(): SearchResultSet
47
    {
48
        return $this->resultSet;
49
    }
50
51
    /**
52
     * @return array
53
     */
54
    public function getAdditionalFilters(): array
55
    {
56
        return $this->additionalFilters;
57
    }
58
}
59