Re: How to get a code review?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 3, 2008 at 11:29 AM, David Jourard <davidj@xxxxxxxxxxxxxxxxxxxx>
wrote:

>  I posted it at
>
> http://pastebin.com/m6c8cb17c
>

for the variable names, you might consider camelCase or underscores to
enhance readbility, for example

$htmlpathcomponents

would become

$htmlPathComponents (my preference) or

$html_path_components

i would recommend getting away from use of the global keyword in ur
methods.  in GetSessionKey and VerifyLoginTicket, why not use a reference
parameter as you did in OpenParam

function VerifyLoginTicket($sessionticket, &$verifydata, &$returnMessages)
function GetSessionKey($id, &$List, &$returnMessages)

i would also recommend getting away from usage of the $GLOBALS array.  it
has its place, but in general i would venture to say its best avoided.

also, method names are typically started w/ lower case letters, where as
capitalization is typically used for class names, so for example
VerfiyLoginTicket becomes verfiyLoginTicket

theres really no good reason for calling

return;

as the last line of a function that i can think of; you can safely omit that
statement (eg. last line in VerfiyLoginTicket)

im sure theres more to say here, but im pooped :O

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux