Passed
Pull Request — task/3376-TYPO3_12_compatibili... (#3452)
by
unknown
41:20
created

AfterFrequentlySearchedEvent::getResultSet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
namespace ApacheSolrForTypo3\Solr\Event\Search;
18
19
use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\SearchResultSet;
20
21
/**
22
 * This event is dispatched after the frequently searched was executed.
23
 * It contains the result of that search request.
24
 *
25
 * @author Lars Tode <[email protected]>
26
 */
27
final class AfterFrequentlySearchedEvent
28
{
29
    private SearchResultSet $resultSet;
30
    private array $additionalFilters;
31
32
    /**
33
     * @param SearchResultSet $resultSet
34
     * @param array $additionalFilters
35
     */
36
    public function __construct(SearchResultSet $resultSet, array $additionalFilters)
37
    {
38
        $this->resultSet = $resultSet;
39
        $this->additionalFilters = $additionalFilters;
40
    }
41
42
    /**
43
     * @return SearchResultSet
44
     */
45
    public function getResultSet(): SearchResultSet
46
    {
47
        return $this->resultSet;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function getAdditionalFilters(): array
54
    {
55
        return $this->additionalFilters;
56
    }
57
}
58