Skip to content

Commit

Permalink
Discard changes to src/Event/Value/Test/TestDox.php
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Mar 12, 2024
1 parent 52e170f commit 333f593
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Event/Value/Test/TestDox.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
namespace PHPUnit\Event\Code;

use RuntimeException;

/**
* @psalm-immutable
*
Expand All @@ -20,25 +18,24 @@
{
private string $prettifiedClassName;
private string $prettifiedMethodName;
private string $prettifiedAndColorizedMethodName;

public function __construct(string $prettifiedClassName, string $prettifiedMethodName)
public function __construct(string $prettifiedClassName, string $prettifiedMethodName, string $prettifiedAndColorizedMethodName)
{
$this->prettifiedClassName = $prettifiedClassName;
$this->prettifiedMethodName = $prettifiedMethodName;
$this->prettifiedClassName = $prettifiedClassName;
$this->prettifiedMethodName = $prettifiedMethodName;
$this->prettifiedAndColorizedMethodName = $prettifiedAndColorizedMethodName;
}

public function prettifiedClassName(): string
{
return $this->prettifiedClassName;
}

/**
* @throws RuntimeException
*/
public function prettifiedMethodName(bool $colorize = false): string
{
if ($colorize) {
throw new RuntimeException('Colorized pretty printing of method names is no longer supported for performance reasons.');
return $this->prettifiedAndColorizedMethodName;
}

return $this->prettifiedMethodName;
Expand Down

0 comments on commit 333f593

Please sign in to comment.