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\DefaultCode
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);
}