R
R
Roman2019-09-14 08:05:45
Documentation
Roman, 2019-09-14 08:05:45

How to properly comment PHP and JS code, are there any standards described somewhere?

The customer wants the development to be well documented :)
Tell me, are there any formal standards in this regard?
For example, you often see something like this in the code of frameworks:

/**
     * Resolve the element's value.
     *
     * @param  mixed  $resource
     * @param  string|null  $attribute
     * @return void
     */

Is this predetermined somewhere? Any specifications?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WapSter, 2019-09-14
@procode

For js I use this method , for php I think it will work too. Well, so, the code should be self-documenting, the correct names of variable functions, in BEM css.

A
Anton R., 2019-09-14
@anton_reut

With well-written OOP code, comments are not needed at all)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question