This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
11
{
12
/**
13
* Split constructor.
14
*
15
* @param $field
16
* @param $separator
17
*/
18
public function __construct($field, $separator)
19
{
20
$this->setField($field);
21
$this->setSeparator($separator);
22
}
23
24
/**
25
* Set the field.
26
*
27
* @param string $field
28
*
29
* @return $this
30
*/
31
public function setField(string $field)
32
{
33
return $this->setParam('field', $field);
34
}
35
36
/**
37
* Set the separator.
38
*
39
* @param string $separator
40
*
41
* @return $this
42
*/
43
public function setSeparator(string $separator)
44
{
45
return $this->setParam('separator', $separator);
46
}
47
48
/**
49
* Set ignore_missing. Default value false.
50
*
51
* @param bool $ignoreMissing only these values are allowed (integer|float|string|boolean|auto)
52
*
53
* @return $this
54
*/
55
public function setIgnoreMissing(bool $ignoreMissing)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.