/**
  * Create a new error from a PHP error.
  *
  * @param Bugsnag_Configuration $config      the config instance
  * @param Bugsnag_Diagnostics   $diagnostics the diagnostics instance
  * @param int                   $code        the error code
  * @param string                $message     the error message
  * @param string                $file        the error file
  * @param int                   $line        the error line
  * @param bool                  $fatal       if the error was fatal
  *
  * @return self
  */
 public static function fromPHPError(Bugsnag_Configuration $config, Bugsnag_Diagnostics $diagnostics, $code, $message, $file, $line, $fatal = false)
 {
     $error = new self($config, $diagnostics);
     $error->setPHPError($code, $message, $file, $line, $fatal);
     return $error;
 }