我如何评论我正在从其他作者处修改的 PHP 类?

发布于 2024-10-10 02:10:59 字数 109 浏览 0 评论 0原文

我正在修改另一个作者编写的一个类。我想知道在文档中添加我的修改的正确方法是什么,同时确保对原作者给予适当的认可。我应该重置版本控制还是继续?我应该添加到原始 PHPDoc 注释中还是应该创建自己的单独块?

There is a class that I am modifying that another author 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心碎无痕… 2024-10-17 02:10:59

您应该使用版本控制系统,例如 git、mercurial 或 subversion,并对代码执行任何需要的操作。提交中的日志条目将识别谁更改了什么。

除此之外,如果您仅更改内联文档,请在更改日志中添加一行以指示您所做的事情。您可能会更改版本号,但这是有争议的。

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.

攀登最高峰 2024-10-17 02:10:59

在我看来,您好像在问应该如何更新文档块的信息值,而不是记录您所做的修改。如果是这样,则只需在文档块的描述中添加附加信息,并添加任何新的 @ 标签(如果适用)。

如果您仍然想突出作者身份,请使用 @author 标签来显示原文和您自己。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文