Skip to content
Advertisement

Tag: docblocks

Annotations: How to specify timestamps in docblocks in php

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:

Advertisement