Skip to content

Commit fcdba19

Browse files
author
Kirill Nesmeyanov
committed
Fix psalm errors
1 parent 6293fb1 commit fcdba19

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Node/Literal/LiteralKind.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ enum LiteralKind: int implements \JsonSerializable
5353
*/
5454
public function jsonSerialize(): int
5555
{
56+
/** @var int<0, max> */
5657
return $this->value;
5758
}
5859
}

src/Node/Stmt/ClassConstNode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public function __construct(Name $class, Identifier|string $constant)
1919

2020
public function jsonSerialize(): array
2121
{
22+
assert($this->constant !== null, 'Const ref cannot be null');
23+
2224
return [
2325
'kind' => TypeKind::CLASS_CONST_KIND,
2426
'class' => $this->class->toString(),

0 commit comments

Comments
 (0)