PHPStorm: correct PHPDoc for a Collection of Objects?

后端 未结 1 1531
长发绾君心
长发绾君心 2020-12-30 22:21

I\'m using the PHPStorm IDE, and run into trouble when I run the code inspection.

I have a method which returns a collection of objects. The Collection

相关标签:
1条回答
  • 2020-12-30 23:06

    You can combine them (both types) together. May not be ideal in some situations, but works and you may consider it better than manually specifying type via @var PHPDoc comment.

    /** @return Collection|Order[] */
    
    0 讨论(0)
提交回复
热议问题