I have a mehtod that returns timestamps. I want to do something like this: However, I don’t think @return array<int, timestamp> is valid. What is the valid format for specifying timestamps in docblocks? Answer You can use int[], there is no valid value for timestamps. You can however create a ValueObject. If you use a value object:
Tag: docblocks
What does the annotation @template mean in PHP doc blocks?
I could see this PHPDoc block in the FakerPHP/Faker package, and I’m not aware what does @template mean? you can find it in the package’s main branch on this line Answer The @template annotation relates to a concept called Generics, which does not currently exist in PHP, but are a way of dynamically describing the contents of a parameter or
PHPDocumentor – what’s wrong with my DocBlock?
I’m putting in some comments in some legacy code, and I’ve run across a small issue with PHPDocumentor. Here’s an example: /** * Constructs the Widget object * * Basic constructor for the widget …