php - How to write PHPDoc for parameters not specifically specified in the function declaration -


If I have a parameter, then I'm logging in like this

$ msg = Input.get ("message");

Do I also use the ultimate tag, or this parameter only like

public function stepfile ($ user,

Thank you.

In addition, when you return a Jason object, what is the correct way of the document

thanks. < P> JSON is not a recognized php datatype, so you can use that string or stud class in a real way, on which JSON Is represented by the $ msg variable.

If you want a datatize document for $ msg, then there is an informal syntax that will recognize some IDEs: <

Again, this is an unofficial syntax that > Some ID IDE will recognize that some IDE instead of the DATTIPYPE search for the name of the variable name They are:

  / ** @var $ msg string a JSON string * /   

Neither is considered to be "standard" usage, but the first one Has been proposed to standardize in PHP-FIG's PSR-5 format. I suggest using it, and if your IDE likes it, then only use other syntax.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -