Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One thing I run into is an array shape that is reused in a lot of places. These are typically associative arrays from a database table, and is passed around to various functions.
What is the best way to annotate such an array shape in one place and reuse it, so you don’t need to rewrite the same shape in lots of function docblocks?
One thought I had would be to make a plug-in that respects syntax like
@param array{\path\to\some\Class}
and define the properties in a class definition.
The nice thing about that would be, once psalm validates all the usage, you could migrate it to use the class instead of the array.
I’m interested to know how others deal with this.
Beta Was this translation helpful? Give feedback.
All reactions