nikhilkalige / docblockr

DocBlockr is a package for Atom which is designed to make writing documentation faster and easier.
MIT License
405 stars 93 forks source link

PHP @method misuse #303

Open Arcesilas opened 6 years ago

Arcesilas commented 6 years ago

PHP docblocks for methods always contain an @method tag: this is a misuse of this tag, according to https://docs.phpdoc.org/references/phpdoc/tags/method.html

@method tags MUST NOT be used in a PHPDoc that is not associated with a class or interface.

Or maybe this package is for another phpdoc generator?

Could it be removed from template? Or is there a way to customize the templates?

MoritzKn commented 6 years ago

The @method shouldn't be there. I can't reproduce this. Could it be that you added @method in the extra_tags configuration?

rabrowne85 commented 5 years ago

@Arcesilas I had the same question and when I looked into the source for the DocsParser.prototype.format_function function definition, I noticed that there's this code at line 140:

    if (this.editor_settings.auto_add_method_tag) {
        out.push('@method '+ escape(name));
    }

I checked my Docblockr package settings in Atom and sure enough the tick box was checked. Unchecking this solved my issue. Not sure if it'll be the same for you, but might also explain why @MoritzKn couldn't reproduce this behaviour.