| @@ 12-24 (lines=13) @@ | ||
| 9 | * |
|
| 10 | * @return Error[]|null The errors, if there were any |
|
| 11 | */ |
|
| 12 | public function getErrors() |
|
| 13 | { |
|
| 14 | $ret = []; |
|
| 15 | $errors = $this->getEntityValue('errors', []); |
|
| 16 | if (empty($errors)) { |
|
| 17 | return null; |
|
| 18 | } |
|
| 19 | foreach ($errors as $error) { |
|
| 20 | $ret[] = new Error($error); |
|
| 21 | } |
|
| 22 | ||
| 23 | return $ret; |
|
| 24 | } |
|
| 25 | ||
| 26 | /** |
|
| 27 | * Gets the 'matched_segments' parameter. |
|
| @@ 30-42 (lines=13) @@ | ||
| 27 | * |
|
| 28 | * @return Error[]|null The errors, if there were any |
|
| 29 | */ |
|
| 30 | public function getErrors() |
|
| 31 | { |
|
| 32 | $ret = []; |
|
| 33 | $errors = $this->getEntityValue('errors', []); |
|
| 34 | if (empty($errors)) { |
|
| 35 | return null; |
|
| 36 | } |
|
| 37 | foreach ($errors as $error) { |
|
| 38 | $ret[] = new Error($error); |
|
| 39 | } |
|
| 40 | ||
| 41 | return $ret; |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||