Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSide666 authored and sebastianbergmann committed Apr 29, 2024
1 parent 6bd25d4 commit d2a4b10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/Runner/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use const E_WARNING;
use function array_keys;
use function array_values;
use function assert;
use function debug_backtrace;
use function error_reporting;
use function restore_error_handler;
Expand Down Expand Up @@ -259,13 +258,15 @@ private function trigger(TestMethod $test, bool $filterTrigger): IssueTrigger

if (isset($trace[0]['file']) && (
$trace[0]['file'] === $test->file() ||
$this->sourceFilter->includes($this->source, $trace[0]['file']))) {
$this->sourceFilter->includes($this->source, $trace[0]['file'])
)) {
$triggeredInFirstPartyCode = true;
}

if (isset($trace[1]['file']) && (
$trace[1]['file'] === $test->file() ||
$this->sourceFilter->includes($this->source, $trace[1]['file']))) {
$this->sourceFilter->includes($this->source, $trace[1]['file'])
)) {
$triggerCalledFromFirstPartyCode = true;
}

Expand Down
7 changes: 5 additions & 2 deletions tests/end-to-end/regression/5822/tests/Issue5822Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
*/
namespace PHPUnit\TestFixture\Issue5822;

use const E_USER_DEPRECATED;
use function call_user_func;
use function trigger_error;
use PHPUnit\Framework\TestCase;

class Issue5822Test extends TestCase
{
public function testDebugBacktrace()
public function testDebugBacktrace(): void
{
$this->callUserFuncExample();
$this->assertTrue(true);
Expand All @@ -26,6 +29,6 @@ private function callUserFuncExample(): void

private function exampleCallback(): void
{
trigger_error('My Deprecation Error', \E_USER_DEPRECATED);
trigger_error('My Deprecation Error', E_USER_DEPRECATED);
}
}

0 comments on commit d2a4b10

Please sign in to comment.