Skip to content
Advertisement

Tag: documentation

Lint dynamic return types in PHP

I would like to be able to autocomplete when using my following code. I have looked for a solution, but just can’t seem to find anything. This is about what my models look like. In the following example I would like to be able to tab example and test My function to retrieve a model: This is how I call

PhpDocs: Possible to link method in parameter description?

Is it possible to link to another method/class/property/etc. inside my project inline inside the @deprecated tag? Like this: ? Answer According to PHPdoc.org, you could use the @see tag for that. Also, PHPdoc.org recommends to use @see in case of a @deprecated method: It is RECOMMENDED (but not required) to provide an additional description stating why the associated element is

What do #@+ and #@- in PHP comment blocks mean?

I’ve seen several PHP files where there are some special characters at the beginning of a doc block. It starts with /**#@+ some doc-text */ and ends with /**#@-*/. What do these symbols mean? I found that this seems to be used in various PHP frameworks (Zend, phpseclib, Magento) but couldn’t find an explanation. Example: Answer They are used for

Automatically create documentation by reading function comments (PHP)

Let’s say I have: By using get_class_methods(new myclass()); I can get the classes. Now my question is this: can I read the comments from the class function into a string? So I can create auto generated documentation. Answer You can’t get access to comments from PHP if the target file is included with include, include_once, require or require_once because php-parser

Advertisement