@@ 39-46 (lines=8) @@ | ||
36 | /** |
|
37 | * @inheritdoc |
|
38 | */ |
|
39 | function jsonSerialize() |
|
40 | { |
|
41 | $_aRet = (array) $this; |
|
42 | $_aRet = array_filter($_aRet, function($v, $k) { |
|
43 | return !is_null($v); |
|
44 | }, ARRAY_FILTER_USE_BOTH ); |
|
45 | return $_aRet; |
|
46 | } |
|
47 | } |
@@ 157-164 (lines=8) @@ | ||
154 | * @inheritdoc |
|
155 | * @return array |
|
156 | */ |
|
157 | public function jsonSerialize() |
|
158 | { |
|
159 | $_aRet = (array) $this; |
|
160 | $_aRet = array_filter( |
|
161 | $_aRet, |
|
162 | function($v, $k) { |
|
163 | return !is_null($v) || empty($v); |
|
164 | }, |
|
165 | ARRAY_FILTER_USE_BOTH |
|
166 | ); |
|
167 | return $_aRet; |