diff --git a/src/Error/Error.php b/src/Error/Error.php index 06e95a5a324..cc209aca238 100644 --- a/src/Error/Error.php +++ b/src/Error/Error.php @@ -53,6 +53,7 @@ final class Error implements \JsonSerializable private ?string $diff; /** + * @param self::TYPE_* $type * @param list $appliedFixers */ public function __construct(int $type, string $filePath, ?\Throwable $source = null, array $appliedFixers = [], ?string $diff = null) diff --git a/tests/Error/ErrorTest.php b/tests/Error/ErrorTest.php index e5d00665afe..73ecba713c5 100644 --- a/tests/Error/ErrorTest.php +++ b/tests/Error/ErrorTest.php @@ -32,7 +32,7 @@ public function testThatErrorTypeConstantValuesAreDifferent(): void public function testConstructorSetsValues(): void { - $type = 123; + $type = 1; $filePath = 'foo.php'; $error = new Error( @@ -49,7 +49,7 @@ public function testConstructorSetsValues(): void public function testConstructorSetsValues2(): void { - $type = 456; + $type = 2; $filePath = __FILE__; $source = new \Exception(); $appliedFixers = ['some_rule'];