Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed May 19, 2024
1 parent b7fe56f commit 85cd836
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/LogFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,18 @@ public function assertChannelIsCurrentlyForgotten(string $name, ?string $message

/**
* @link ... Documentation
*
* @param (Closure(array<string, mixed>): bool)|array<string, mixed> $callback
*/
public function assertHasSharedContext(Closure|array $callback, ?string $message = null): LogFake
{
$callback = is_array($callback)
? fn ($context) => $context === $callback
$callback;
: $callback;

PHPUnit::assertTrue(
$callback($this->sharedContext),
$message ?? "Expected shared context was not found."
$message ?? 'Expected shared context was not found.'

Check warning on line 107 in src/LogFake.php

View workflow job for this annotation

GitHub Actions / Check

Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ public function assertHasSharedContext(Closure|array $callback, ?string $message = null): LogFake { $callback = is_array($callback) ? fn($context) => $context === $callback : $callback; - PHPUnit::assertTrue($callback($this->sharedContext), $message ?? 'Expected shared context was not found.'); + PHPUnit::assertTrue($callback($this->sharedContext), 'Expected shared context was not found.' ?? $message); return $this; } /**
);

return $this;
Expand Down

0 comments on commit 85cd836

Please sign in to comment.