Re: How to get a code review?
| From: | Nathan Nobbe | Date: | Thu, 03 Apr 2008 17:47:59 +0000 |
| Subject: | Re: How to get a code review? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272503@lists.php.net to get a copy of this message | ||
On Thu, Apr 3, 2008 at 11:29 AM, David Jourard <davidj@bytesinteractive.com>
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