Skip to content

Commit

Permalink
Improve type in Error constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirone committed Feb 1, 2024
1 parent c471778 commit 6deb7e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Error/Error.php
Expand Up @@ -53,6 +53,7 @@ final class Error implements \JsonSerializable
private ?string $diff;

/**
* @param self::TYPE_* $type
* @param list<string> $appliedFixers
*/
public function __construct(int $type, string $filePath, ?\Throwable $source = null, array $appliedFixers = [], ?string $diff = null)
Expand Down
4 changes: 2 additions & 2 deletions tests/Error/ErrorTest.php
Expand Up @@ -32,7 +32,7 @@ public function testThatErrorTypeConstantValuesAreDifferent(): void

public function testConstructorSetsValues(): void
{
$type = 123;
$type = 1;
$filePath = 'foo.php';

$error = new Error(
Expand All @@ -49,7 +49,7 @@ public function testConstructorSetsValues(): void

public function testConstructorSetsValues2(): void
{
$type = 456;
$type = 2;
$filePath = __FILE__;
$source = new \Exception();
$appliedFixers = ['some_rule'];
Expand Down

0 comments on commit 6deb7e0

Please sign in to comment.