| @@ 87-98 (lines=12) @@ | ||
| 84 | /** | |
| 85 | * @return array | |
| 86 | */ | |
| 87 | public function toArray() | |
| 88 |     { | |
| 89 | $result = [ | |
| 90 | 'id' => $this->id, | |
| 91 | 'name' => $this->name, | |
| 92 | 'type' => $this->type, | |
| 93 | ]; | |
| 94 |         if (!empty($this->value)) { | |
| 95 | $result['value'] = $this->getValue(); | |
| 96 | } | |
| 97 | return $result; | |
| 98 | } | |
| 99 | ||
| 100 | /** | |
| 101 | * @return int | |
| @@ 60-69 (lines=10) @@ | ||
| 57 | /** | |
| 58 | * @return array | |
| 59 | */ | |
| 60 | public function toArray() | |
| 61 |     { | |
| 62 | $result = [ | |
| 63 | 'id' => $this->id, | |
| 64 | 'type' => $this->type, | |
| 65 | 'name' => $this->name, | |
| 66 | 'value' => $this->value, | |
| 67 | ]; | |
| 68 | return $result; | |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * @return bool | |