Completed
Pull Request — master (#1893)
by
unknown
02:46
created

RemoveProcessor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

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 Remove Processor.
7
 *
8
 * @author Federico Panini <[email protected]>
9
 *
10
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/remove-processor.html
11
 */
12
class RemoveProcessor extends AbstractProcessor
13
{
14
    /**
15
     * @param array|string $field
16
     */
17
    public function __construct($field)
18
    {
19
        $this->setField($field);
20
    }
21
22
    /**
23
     * Set field.
24
     *
25
     * @param array|string $field
26
     *
27
     * @return $this
28
     */
29
    public function setField($field): self
30
    {
31
        return $this->setParam('field', $field);
32
    }
33
}
34