Skip to content

Commit

Permalink
Fix psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Apr 2, 2024
1 parent ee83c0c commit 9101566
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Tag/OptionalTypeProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
* tag that contains type information (that is, an AST object).
*
* Requires a `type-lang/parser` dependency for {@see TypeStatement} support.
*
* @psalm-suppress UndefinedClass : Expects optional `type-lang/parser` dependency.
*/
interface OptionalTypeProviderInterface
{
/**
* Returns an AST object of the type or {@see null} in case the
* type is not specified.
*
* @psalm-suppress UndefinedClass : Expects optional `type-lang/parser` dependency.
* @psalm-immutable Each call to the method must return the same value.
*/
public function getType(): ?TypeStatement;
Expand Down
4 changes: 1 addition & 3 deletions src/Tag/TypeProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@

use TypeLang\Parser\Node\Stmt\TypeStatement;

/**
* @psalm-suppress UndefinedClass : Expects optional `type-lang/parser` dependency.
*/
interface TypeProviderInterface extends OptionalTypeProviderInterface
{
/**
* Returns an AST object of the type.
*
* @psalm-suppress UndefinedClass : Expects optional `type-lang/parser` dependency.
* @psalm-immutable Each call to the method must return the same value.
*/
public function getType(): TypeStatement;
Expand Down
3 changes: 3 additions & 0 deletions src/Tag/TypedTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function __construct(
parent::__construct($name, $description);
}

/**
* @psalm-suppress UndefinedClass
*/
public function getType(): TypeStatement
{
return $this->type;
Expand Down

0 comments on commit 9101566

Please sign in to comment.