开发者

How would I comment a PHP class I am modifying from another author?

开发者 https://www.devze.com 2023-02-02 13:16 出处:网络
There is a class that I am modifying that another a开发者_开发问答uthor has written.I am wondering what is the right way add my modifications to the documentation while making sure that proper credit

There is a class that I am modifying that another a开发者_开发问答uthor has written. I am wondering what is the right way add my modifications to the documentation while making sure that proper credit is given to the original author. Should I reset the versioning or continue it? Should I add to the original PHPDoc comments or should I create my own separate block?


you should use a version control system such as git, mercurial or subversion, and do whatever is needed to the code. Log entries in your commits will identify who changed what.

Barring that, if you are changing only inline documentation, add a line to the changelog indicating what you did. You might bump the version number, but that's debatable.


It sounds to me like you're asking how you should update the informational value of the docblock, rather than record that you've made modifications. If so, then just add your additional information in the docblock's description, and add any new @ tags if they apply.

If you are still wanting to highlight authorship, then use @author tags to show the original(s) and yourself.

0

精彩评论

暂无评论...
验证码 换一张
取 消