$role, 'value' => $value, 'certainty' => $certainty]); switch ($role) { default: Log::error('Import entry cannot handle object.', ['role' => $role]); throw new FireflyException('Import entry cannot handle object of type "' . $role . '".'); break; case 'amount': /* * Easy enough. */ $this->setAmount($convertedValue); return; } } /** * @param float $amount */ private function setAmount(float $amount) { $this->amount = $amount; } }