Passed
Push — master ( 5f60a5...391298 )
by Timo
24:49
created

LastSearchesViewHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 23
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A injectLastSearchesController() 0 3 1
1
<?php
2
namespace ApacheSolrForTypo3\Solr\ViewHelpers\Widget;
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
use ApacheSolrForTypo3\Solr\ViewHelpers\Widget\Controller\LastSearchesController;
18
use ApacheSolrForTypo3\Solr\Widget\AbstractWidgetViewHelper;
19
20
/**
21
 * Class LastSearchesViewHelper
22
 *
23
 * @author Frans Saris <[email protected]>
24
 * @author Timo Hund <[email protected]>
25
 * @package ApacheSolrForTypo3\Solr\ViewHelpers\Widget
26
 */
27
class LastSearchesViewHelper extends AbstractWidgetViewHelper
28
{
29
30
    /**
31
     * @var LastSearchesController
32
     */
33
    protected $controller;
34
35
    /**
36
     * @param LastSearchesController $lastSearchesController
37
     */
38 32
    public function injectLastSearchesController(LastSearchesController $lastSearchesController)
39
    {
40 32
        $this->controller = $lastSearchesController;
41 32
    }
42
43
    /**
44
     * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface
45
     * @throws \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException
46
     */
47 32
    public function render()
48
    {
49 32
        return $this->initiateSubRequest();
50
    }
51
}
52