@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | // Todo: verify the checksums. |
| 55 | 55 | $xData = ($this->fData)(); |
| 56 | 56 | $aData = is_string($xData) ? |
| 57 | - (json_decode($xData, true) ?: []) : |
|
| 58 | - (is_array($xData) ? $xData : []); |
|
| 57 | + (json_decode($xData, true) ?: []) : (is_array($xData) ? $xData : []); |
|
| 59 | 58 | // Ensure all contents are arrays. |
| 60 | 59 | return array_map(fn($aValue) => is_array($aValue) ? $aValue : [], $aData); |
| 61 | 60 | } |
@@ -83,7 +82,7 @@ discard block |
||
| 83 | 82 | public function writeCommand(): void |
| 84 | 83 | { |
| 85 | 84 | $xDatabag = $this->databag(); |
| 86 | - if($xDatabag->touched()) |
|
| 85 | + if ($xDatabag->touched()) |
|
| 87 | 86 | { |
| 88 | 87 | // Todo: calculate the checksums. |
| 89 | 88 | $this->addCommand('databag.set', ['values' => $xDatabag]); |