@@ 41-58 (lines=18) @@ | ||
38 | /** |
|
39 | * {@inheritdoc} |
|
40 | */ |
|
41 | public function getArray() |
|
42 | { |
|
43 | $out = array_filter( |
|
44 | [ |
|
45 | 'field' => $this->getField(), |
|
46 | 'script' => $this->getScript(), |
|
47 | 'precision_threshold' => $this->getPrecisionThreshold(), |
|
48 | 'rehash' => $this->isRehash(), |
|
49 | ], |
|
50 | function ($val) { |
|
51 | return ($val || is_bool($val)); |
|
52 | } |
|
53 | ); |
|
54 | ||
55 | $this->checkRequiredFields($out); |
|
56 | ||
57 | return $out; |
|
58 | } |
|
59 | ||
60 | /** |
|
61 | * Precision threshold. |
@@ 100-117 (lines=18) @@ | ||
97 | /** |
|
98 | * {@inheritdoc} |
|
99 | */ |
|
100 | public function getArray() |
|
101 | { |
|
102 | $out = array_filter( |
|
103 | [ |
|
104 | 'field' => $this->getField(), |
|
105 | 'script' => $this->getScript(), |
|
106 | 'values' => $this->getValues(), |
|
107 | 'compression' => $this->getCompression(), |
|
108 | ], |
|
109 | function ($val) { |
|
110 | return ($val || is_numeric($val)); |
|
111 | } |
|
112 | ); |
|
113 | ||
114 | $this->isRequiredParametersSet($out); |
|
115 | ||
116 | return $out; |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * @param array $a |
@@ 100-117 (lines=18) @@ | ||
97 | /** |
|
98 | * {@inheritdoc} |
|
99 | */ |
|
100 | public function getArray() |
|
101 | { |
|
102 | $out = array_filter( |
|
103 | [ |
|
104 | 'compression' => $this->getCompression(), |
|
105 | 'percents' => $this->getPercents(), |
|
106 | 'field' => $this->getField(), |
|
107 | 'script' => $this->getScript(), |
|
108 | ], |
|
109 | function ($val) { |
|
110 | return ($val || is_numeric($val)); |
|
111 | } |
|
112 | ); |
|
113 | ||
114 | $this->isRequiredParametersSet($out); |
|
115 | ||
116 | return $out; |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * @param array $a |