Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResultPrinter.php

function ResultPrinter::reasonLocation

1 call to ResultPrinter::reasonLocation()
ResultPrinter::mapTestsWithIssuesEventsToElements in vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php
@psalm-param…

File

vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php, line 606

Class

ResultPrinter
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\TextUI\Output\Default

Code

private function reasonLocation(ConsideredRisky|DeprecationTriggered|ErrorTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpunitDeprecationTriggered|PhpunitErrorTriggered|PhpunitWarningTriggered|PhpWarningTriggered|WarningTriggered $reason, bool $single) : string {
    if (!$reason instanceof DeprecationTriggered && !$reason instanceof PhpDeprecationTriggered && !$reason instanceof ErrorTriggered && !$reason instanceof NoticeTriggered && !$reason instanceof PhpNoticeTriggered && !$reason instanceof WarningTriggered && !$reason instanceof PhpWarningTriggered) {
        return '';
    }
    return sprintf('%s%s:%d%s', $single ? '' : '  ', $reason->file(), $reason->line(), PHP_EOL);
}
RSS feed
Powered by Drupal