Edit = $this->setEdit($sqlQueryBox); $this->Explain = $this->setExplain($sqlQueryBox); $this->ShowAsPHP = $this->setShowAsPHP($sqlQueryBox); $this->Refresh = $this->setRefresh($sqlQueryBox); } /** @return array */ public function asArray(): array { return [ 'Edit' => $this->Edit, 'Explain' => $this->Explain, 'ShowAsPHP' => $this->ShowAsPHP, 'Refresh' => $this->Refresh, ]; } /** @param mixed[] $sqlQueryBox */ private function setEdit(array $sqlQueryBox): bool { return ! isset($sqlQueryBox['Edit']) || $sqlQueryBox['Edit']; } /** @param mixed[] $sqlQueryBox */ private function setExplain(array $sqlQueryBox): bool { return ! isset($sqlQueryBox['Explain']) || $sqlQueryBox['Explain']; } /** @param mixed[] $sqlQueryBox */ private function setShowAsPHP(array $sqlQueryBox): bool { return ! isset($sqlQueryBox['ShowAsPHP']) || $sqlQueryBox['ShowAsPHP']; } /** @param mixed[] $sqlQueryBox */ private function setRefresh(array $sqlQueryBox): bool { return ! isset($sqlQueryBox['Refresh']) || $sqlQueryBox['Refresh']; } }