Pádraic Brady wrote:
If I'm honest, I don't like much of the coding standards for the framework, but I do understand that we need to have something in place and that it's the sort of thing developers get religious about. Given that standards are now in place and that preferences aside it doesn't make much difference, I don't see the value in discussing it. There will never be absolute consensus on coding standards for any group of programmers larger than 1 :) However :) For reference, my preferred coding standards give you code like: <?php class Foo { public $bar; private $quux; public function Test( $text ) { if( $text != "" ) { print( $text ); } else { throw new Exception( "Test called with no text!" ); } } private function SomeDatabaseStuff( $id ) { $db = new DatabaseConnection( "somedsn" ); $result = $db->Query( " SELECT foo, bar, baz FROM some_table WHERE id = ? LIMIT 1 ", array( $id ) ); return $result[ 0 ]; } } ?> We use tabs to indent and we have no maximum line length because all of our editors have the same tab size and do good soft-wrapping. |
- Re: [fw-general] Coding Standards & ZF 0.2 Mat Scales
- Re: [fw-general] Coding Standards & ZF 0.2 Rob Allen
- Re: [fw-general] Coding Standards & ZF 0.2 Gavin Vess
- Re: [fw-general] Coding Standards & ZF 0.2 Gavin Vess
- Re: [fw-general] Coding Standards & ZF 0... Christopher Thompson
- Re: [fw-general] Coding Standards & ZF 0... Simon Mundy
- Re: [fw-general] Coding Standards & ZF 0... Peter Hodge
- Re: [fw-general] Coding Standards & ... Simon Mundy
- Re: [fw-general] Coding Standards &a... Peter Hodge
- Re: [fw-general] Coding Standar... Rob Allen
- Re: [fw-general] Coding Standards & ZF 0... Thomas Weidner
