Skip to content

Commit

Permalink
Revert stricter param type which would be a BC break.
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Apr 13, 2024
1 parent e408e0b commit ca150d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/PhpParser/Node/Identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ class Identifier extends NodeAbstract {
/**
* Constructs an identifier node.
*
* @psalm-param non-empty-string $name
* @param string $name Identifier as string
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(string $name, array $attributes = []) {
if ($name === '') {
throw new \InvalidArgumentException('Identifier name cannot be empty');
}

$this->attributes = $attributes;
$this->name = $name;
}
Expand Down

0 comments on commit ca150d9

Please sign in to comment.