Passed
Pull Request — release-11.5.x (#3206)
by Michael
40:59 queued 01:38
created

ExtractingQuery::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the TYPO3 CMS project.
5
 *
6
 * It is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License, either version 2
8
 * of the License, or any later version.
9
 *
10
 * For the full copyright and license information, please read the
11
 * LICENSE.txt file that was distributed with this source code.
12
 *
13
 * The TYPO3 project - inspiring people to share!
14
 */
15
16
namespace ApacheSolrForTypo3\Solr\Domain\Search\Query;
17
18
use Solarium\QueryType\Extract\Query as SolariumExtractQuery;
19
20
/**
21
 * Specialized query for content extraction using Solr Cell
22
 */
23
class ExtractingQuery extends SolariumExtractQuery
24
{
25
    /**
26
     * Constructor
27
     *
28
     * @param string $file Absolute path to the file to extract content and meta data from.
29
     */
30 1
    public function __construct($file)
31
    {
32 1
        parent::__construct();
33 1
        $this->setFile($file);
34 1
        $this->addParam('extractFormat', 'text');
35
    }
36
}
37