Skip to content

Use psalm specific annotations when dealing the psalm types #25

@ilario-pierbattista

Description

@ilario-pierbattista

Using general doc block annotation can confuse the IDE of those who use the library without psalm.

/**
  * @template A
  * @template B
  * @param callable(A):B $f
  */
function(callable $f) {
...
}

Without psalm, the IDE won't resolve correctly the type of $f.
Php doc block annotations should encode type in the best way they support.
Any finer type should be encoded using psalm specific annotations.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions