Task #4169

Add CGL rules for annotations

Added by Bastian Waidelich about 12 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
- Documentation -
Start date:
2009-08-06
Due date:
% Done:

100%

Estimated time:
Sprint:
PHP Version:
Has patch:
Complexity:

Description

Since annotations are part of the code in FLOW3, we should add some more rules in the CGL documentation.
E.g. it would be good to have a list of all annotations used in FLOW3 (including @aspect eg).

And it should be stated which annotations are required in which cases.

Additionally the order of annotation tags varies from class to class currently. My suggestion for a defined order is

For classes:

@version
@license

For constructor and methods in classes:

// parameters/return type
@param
@return
// validation
@validate
@dontvalidate
// authors (we might get rid of this?)
@author
// API related
@api
@since
@deprecated
// additional annotations
@see
@todo

For test cases:

@test
@dataProvider
@expectedException
@author

What am I missing?

#1

Updated by Karsten Dambekalns about 12 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns

For classes @aspect and @scope are missing. I'll check more thoroughly. I like the suggested order, so far.

#2

Updated by Karsten Dambekalns about 12 years ago

  • Target version set to 1.0 alpha 5
#3

Updated by Karsten Dambekalns about 12 years ago

I'll commit the suggested change to the manual soon. I added lists like above to the CGL appendix. The required annotations are listed in the standard docblock examples, further explanation of FLOW3-specific annotations must be in the related chapters. Feel free to check my changes and comment if needed!

#4

Updated by Karsten Dambekalns about 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3221.

Also available in: Atom PDF