matches Collision changes

This commit is contained in:
Fabio Ivona
2023-03-31 08:43:59 +02:00
parent a05684026e
commit 681723cbc3
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
@ -7,9 +9,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Code;
use NunoMaduro\Collision\Contracts\CustomEditor;
use NunoMaduro\Collision\Contracts\RenderableOnCollisionEditor;
use PHPUnit\Event\NoPreviousThrowableException;
use PHPUnit\Framework\Exception;
use PHPUnit\Util\Filter;
@ -34,8 +37,7 @@ final class ThrowableBuilder
$trace = Filter::getFilteredStacktrace($t);
if($t instanceof CustomEditor && $t->getCustomEditorFrame()){
$frame = $t->getCustomEditorFrame();
if ($t instanceof RenderableOnCollisionEditor && $frame = $t->toCollisionEditor()) {
$file = $frame->getFile();
$line = $frame->getLine();