Skip to content

Commit d77796d

Browse files
author
Kirill Nesmeyanov
committed
Fix parser psalm errors
1 parent e4e8cda commit d77796d

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

src/Node/Identifier.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ public function __serialize(): array
134134
return [$this->offset, $this->value];
135135
}
136136

137+
/**
138+
* @psalm-suppress MixedAssignment
139+
*/
137140
public function __unserialize(array $data): void
138141
{
139142
$this->offset = $data[0] ?? throw new \UnexpectedValueException(

src/Node/Name.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ public function __serialize(): array
306306
return [$this->offset, $this->parts];
307307
}
308308

309+
/**
310+
* @psalm-suppress MixedAssignment
311+
*/
309312
public function __unserialize(array $data): void
310313
{
311314
$this->offset = $data[0] ?? throw new \UnexpectedValueException(

src/Node/Stmt/ClassConstNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
class ClassConstNode extends ClassConstMaskNode
1111
{
12+
/**
13+
* @param Identifier|non-empty-string $constant
14+
*/
1215
public function __construct(Name $class, Identifier|string $constant)
1316
{
1417
parent::__construct($class, $constant);

src/Node/Stmt/GenericTypeStmt.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function __serialize(): array
2929
return [$this->offset, $this->type];
3030
}
3131

32+
/**
33+
* @psalm-suppress MixedAssignment
34+
*/
3235
public function __unserialize(array $data): void
3336
{
3437
$this->offset = $data[0] ?? throw new \UnexpectedValueException(\sprintf(

src/Node/Stmt/LogicalTypeNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public function __serialize(): array
7676
return [$this->offset, $this->statements];
7777
}
7878

79+
/**
80+
* @psalm-suppress MixedAssignment
81+
*/
7982
public function __unserialize(array $data): void
8083
{
8184
$this->offset = $data[0] ?? throw new \UnexpectedValueException(\sprintf(

0 commit comments

Comments
 (0)