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

DotExpanderProcessor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setField() 0 4 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