Completed
Pull Request — master (#1893)
by
unknown
03:25
created

DotExpanderProcessor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Elastica\Processor;
4
5
/**
6
 * Elastica DotExpander Processor.
7
 *
8
 * @author Federico Panini <[email protected]>
9
 *
10
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/dot-expand-processor.html
11
 */
12
class DotExpanderProcessor extends AbstractProcessor
13
{
14
    public function __construct(string $field)
15
    {
16
        $this->setField($field);
17
    }
18
19
    /**
20
     * Set the field.
21
     *
22
     * @return $this
23
     */
24
    public function setField(string $field): self
25
    {
26
        return $this->setParam('field', $field);
27
    }
28
}
29