RE: [PEAR-DEV] Re: [PEPr] +1 for XML::Query2XML
| From: | Lukas Feiler | Date: | Sat, 15 Apr 2006 14:14:00 +0000 |
| Subject: | RE: [PEAR-DEV] Re: [PEPr] +1 for XML::Query2XML | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42247@lists.php.net to get a copy of this message | ||
> From: hannes.magnusson@gmail.com
> Sent: Saturday, April 15, 2006 1:27 PM
> To: PEAR developer mailinglist
> Cc: Lukas Feiler
> Subject: [PEAR-DEV] Re: [PEPr] +1 for XML::Query2XML
>
>
> I do have couple of comments:
>
> in _hasDOMChild() would be easier to simply:
> return (bool)$element->getElementsByTagName($childTagName)->length;
> (Or remove bool and return how many elements it found).
>
> Same goes for _getDOMChild():
> $domNodeList = $element->getElementsByTagName($childTagName);
> if($domNodeList->length) {
> return $domNodeList->item(0);
> }
>
> And at last; there are few times you use while(list($key, $value) =
> each($array));
> I belive the CS wants it to be foreach($array as $key => $value);
>
> - Hannes
>
Thanks a lot for the comments; I implemented the changes and will publish a
new version as soon as the voting process is finished.
Lukas