[TYPO3-mvc] RFC: Throw exception if action methods have no docblock
Felix Oertel
typo3 at foertel.com
Tue May 25 22:27:41 CEST 2010
Hey,
On 2010-05-25 17:15:41 +0200, Andreas Wolf said:
> well, Eclipse is maybe not some random IDE
for me it is ;-)
> - as far as I can tell, most IDEs don't differ between /* and /** for
> DocBlocks.
that does not really matter as the right format for docBlocks is
specified. they start with /**, just take a look at phpdoc.org to prove
that ;)
> So, maybe we could introduce some warnings, or a check script for
> finding these errors.
I don't really see a need here ... we don't check if you prefix every
variable with '$' either ...
> Or have a warning in the docs
as mentioned, just take a look at the docs at phpdoc.org
> Hm, for auto-generating an API doc docblocks are kind of neccessary.
yah, but most of the extensions are no "API" and so they don't need an
API doc ;) i don't document most of my code because it is obvious what
$image->getCreatorName() does e. g.
>>> This would prevent such errors, and for argument validation we need a
>>> docblock anyways. What is your opinion?
>> as mentioned above: we can hardly force the user to use docblocks if
>> does not want/have to ;)
> Agreed. But I'm not that deep inside the validation thingy of Extbase -
> do we need type hints for the parameters inside the docblock, or is it
> enough to have the object types with the parameter declaration?
Good question ... I would gues the latter but I'm not quite sure atm.
if you use arguments it definetly makes sense to use phpDoc but what
about all the methods without arguments?
regards, foertel
More information about the TYPO3-project-typo3v4mvc
mailing list