What does this even do?
/**
* @return null|string
*/
I'm really confused. I'm applying the leskov substitution principle but does it do anything to a function? or just a note?
What does this even do?
/**
* @return null|string
*/
I'm really confused. I'm applying the leskov substitution principle but does it do anything to a function? or just a note?
This is a phpdoc-style documentation comment. It makes generating documentation for reference easier, and most IDEs will pick up on it.
See https://phpdoc.org/docs/latest/getting-started/your-first-set-of-documentation.html
It does nothing. /* and */ define a comment block.
Interestingly in PHP, the @ symbol in actual code suppresses any errors that might be caused by that code: see What is the use of the @ symbol in PHP?
But, most likely, the whole thing could be simply some documentation, and the @ used to indicate some documentation metadata.