function DrupalStandardsListenerTrait::errorHandler

Handles errors to ensure deprecation messages are not triggered.

Parameters

int $type: The severity level of the error.

string $msg: The error message.

$file: The file that caused the error.

$line: The line number that caused the error.

array $context: The error context.

File

core/tests/Drupal/Tests/Listeners/DrupalStandardsListenerTrait.php, line 171

Class

DrupalStandardsListenerTrait
Listens for PHPUnit tests and fails those with invalid coverage annotations.

Namespace

Drupal\Tests\Listeners

Code

public static function errorHandler($type, $msg, $file, $line, $context = []) {
  if ($type === E_USER_DEPRECATED) {
    return;
  }
  return ErrorHandler::handleError($type, $msg, $file, $line, $context);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.