[PEPr] Comment on XML::XML_Feed_Parser

From: Date: Thu, 22 Sep 2005 18:43:00 +0000
Subject: [PEPr] Comment on XML::XML_Feed_Parser
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39907@lists.php.net to get a copy of this message
Andrew Morton (http://pear.php.net/user/drewish) has commented on the proposal for XML::XML_Feed_Parser. Comment: First off, the code looks good. Most of my comments relate to CS and documentation. Overall: * Not using the required header comment blocks [1]. * In-consistent in naming of member variables. Some private/protected variables begin with an underscore others don't. The PCS advises that PHP5 code not use the leading underscore [2]. Personally, I prefer $_model but I just want to see it see consistent. * Member variables don't have a @var tag to document their data type. XML_Feed_Parser * Why not use a getter/setter pair for $model if it's public? One benefit is that a setter with a type hint will prevent null values. XML_Feed_Parser_Type * getDate($method, $arguments) takes two parameters but only one is used. The documentation seems like it was copied and pasted from another function and doesn't make any sense. It also lists a string as the return type when in fact it would be an integer [3]. * getText(), again, what does the $arguments parameter do? Is it there for use by derived classes? I didn't get too deep into the derived classes but like I said, it looks good. andrew [1] http://pear.php.net/manual/en/standards.header.php [2] http://pear.php.net/manual/en/standards.naming.php [3] http://us2.php.net/strtotime Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=295 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#39907) next »