[TYPO3-team-core-v5] Coding guidelines on one page
Bastian Waidelich
bastian at typo3.org
Sat Sep 20 18:27:45 CEST 2008
Tim Eilers wrote:
Hi Tim,
> ...after a nearly 4 month lag i did an early draft:
> http://forge.typo3.org/attachments/462/FLOW3CGL_on_one_page.pdf
Great, thanks!
a few notes:
1. instead of
"class BasicClass {"
you could put
"class MyClass extends F3::TestPackage::BaseClass implements
F3::TestPackage::SomeInterface {"
to point out, that we're using the complete class name (including
namespace) for base classes and interfaces at the moment in order to
make later refactorings easier.
2. "Type hinting where possible" - an example for a real type hinting
would be helpful (e.g. "public function myMethod(array $myParameter)").
"protected" is an access modifier rather than a type hint.
3. "Of only author of class, use author tag here" - it's difficult to
tell whether you'll stay the only author of a class. IIRC we never add
the @author tag for classes and method stubs.
4. "Version tag is optional" - is it?
5. "namespace F3::Testpackage;" has to be "namespace F3::TestPackage;" ;)
And last: would it be hard to add syntax-highlighting to the code - that
would make it even easier to read.
cheers,
Bastian
More information about the TYPO3-team-core-v5
mailing list