/** * Handle fatal errors and such * * @codeCoverageIgnore */ public function handleShutdown() { $error = error_get_last(); if ($error && Severity::fromPhpErrorNo($error['type']) >= $this->errorHandler->getMinSeverityOnShutdown()) { $error = new ErrorException($error['message'], $error['type'], $error['file'], $error['line']); $this->handleError($error); } }
/** * Handle fatal errors and such * * @codeCoverageIgnore */ public function handleShutdown() { if (!$this->shutdownHandlerRegistered) { return; } $error = error_get_last(); if ($error && Severity::fromPhpErrorNo($error['type']) >= $this->minSeverityOnShutdown) { $this->handleError($error['type'], $error['message'], $error['file'], $error['line']); } }
/** * @dataProvider provideSeverityTranslations */ public function testSeverityTranslation($errorNo, $severity) { $this->assertEquals($severity, Severity::fromPhpErrorNo($errorNo)); }