* update report details * * @param int $id * @param $name * @param $subheader * @param int $type * @param int $parent * @param $pages * @return bool * @throws Exception */
(int $id, $name, int $type, int $parent, $pages, $filters = null)
| 194 | * @throws Exception |
| 195 | */ |
| 196 | public function update(int $id, $name, int $type, int $parent, $pages, $filters = null) { |
| 197 | if (!$this->isOwn($id) || !$this->isValidParent($parent, $id)) { |
| 198 | return false; |
| 199 | } |
| 200 | $normalizedPages = $this->normalizePages($pages); |
| 201 | if ($normalizedPages === null) { |
| 202 | return false; |
| 203 | } |
| 204 | if ($filters !== null) { |
| 205 | try { |
| 206 | $filters = json_encode(PanoramaFilterService::normalize($filters, $normalizedPages)); |
| 207 | } catch (\InvalidArgumentException $e) { |
| 208 | return false; |
| 209 | } |
| 210 | } |
| 211 | return $this->PanoramaMapper->update($id, $name, $type, $parent, json_encode($normalizedPages), $filters); |
| 212 | } |
| 213 | |
| 214 | public function createGroup(int $parent = 0): int { |
| 215 | if (!$this->isValidParent($parent)) { |
nothing calls this directly
no test coverage detected