Pádraic Brady wrote:
Still effects readability though :). Are we worried about screen space?
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.

Reply via email to