Comments (4)
Is this project supposed to use tags like @param and @return?
Yes. Can you give me example of code where you used @param
and @return
and it did not work?
from apigen.
Thanks to my own inconsistencies, I actually found one that actually worked and it's because I forgot to put a linebreak on it. It appears that ApiGen does not like the fact that I put the param description on the next line:
The top function works, the bottom doesn't:
I've tried a couple other documentation generators and they both picked up this documentation just fine.
Also, maybe a different discussion altogether: why doesn't the documentation show @param and @return that include the type and variable name, but omit the description? It would still be useful to see in some cases, for example: PHP 7 and older does not have union type hinting and the argument may not be type hinted but the @param would be.
from apigen.
ApiGen does not like the fact that I put the param description on the next line
Yes, that's how the phpstan's phpdoc parser (which ApiGen uses) works. It will not pick up the description if it does not start on the same line.
Why doesn't the documentation show
@param
and@return
that include the type and variable name, but omit the description?
Can you give me example of code like that?
from apigen.
I suppose this has become a feature request, then. Starting the description on the next line is convention for Drupal, possibly more that I am unaware of. What I do not know is if this should be a feature request for ApiGen or for phpstan's phpdoc parser. Having used two other doc generation solutions which support it, it seems to be possible to support both conventions without conflict.
I would also like to point out that next-line descriptions work as expected for @return, but nothing else that I've been able to find:
To answer your question: Please disregard. It initially appeared that the return type was only showing when it was type-hinted, but the return type in the docs appears to use what immediately follows the @return tag. At this time, I do not have any reason to believe that this is not working as expected.
from apigen.
Related Issues (20)
- Feature Request: includeTagged HOT 6
- Packagist is not auto-updated HOT 1
- Feature Request: Ability to add tracking code HOT 2
- Feature Request: More thorough filtering HOT 3
- Deprecated dependency
- @package tag is not used anymore in 7.0.0-alpha HOT 8
- Not parsing generated files of laravel-ide-helper package HOT 1
- Store index as json HOT 1
- Composer can not find package apigen/apigen with version 7.0@alpha HOT 2
- Missing classes that should exist HOT 1
- feature request: namespace / project overview using `README.md`
- add ability to include custom javascript and css files. HOT 3
- Feature request: document @phpstan-type types HOT 2
- My @todo tags are ignored HOT 1
- @link and @see tags ignored (inline and regular) HOT 1
- Theme Documentations HOT 4
- strict_types declaration must be the very first statement in the script HOT 4
- feature request: New config option to find the correct composer vendor dir
- ApGen web URL leads to some suspicious indonesian site HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apigen.