app->get('config'); $timezone = new CarbonTimeZone($config->get('timezone')); $this->setTimeZone($timezone); $this->displayErrors(false); if ($config->get('environment') == 'development') { $this->displayErrors(true); $this->errorReporting(E_ALL); } } /** * @param CarbonTimeZone $timeZone * @codeCoverageIgnore */ protected function setTimeZone(CarbonTimeZone $timeZone) { ini_set('date.timezone', $timeZone); date_default_timezone_set($timeZone); } /** * @param bool $displayErrors * @codeCoverageIgnore */ protected function displayErrors(bool $displayErrors) { ini_set('display_errors', $displayErrors); } /** * @param int $errorReporting * @codeCoverageIgnore */ protected function errorReporting(int $errorReporting) { error_reporting($errorReporting); } }