Re: Re: exceptions, errors, and documentation

From: Date: Sun, 13 Jun 2004 20:00:22 +0000
Subject: Re: Re: exceptions, errors, and documentation
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30615@lists.php.net to get a copy of this message
Hi Michael: On Tue, Jun 08, 2004 at 09:21:41PM +0200, Michael Wallner wrote: > Hi Greg Beaver, you wrote: > > > No, the proto is void by default as in > > > > @return void > > > > @return mixed implies that the user should expect any valid PHP type as > > the return, and the documentation will describe any limitations. > > > > @return bool|PEAR_Error say that the user should expect either true, > > false, or a PEAR_Error > > Hm, so what will we see in <funcdef/>, or better what should > it be in that case? I'd guess "mixed". Pardon my long delay in responding... phpDocumentor's combined data type handling is nice. As mentioned before, I'm in the camp used in PHP's documentation, which generally follows the JavaDoc standard. In short, for the data type, use the one that is supposed to be returned under normal circumstances. Then, in the text, explain what comes back when errors happen. Example: http://www.php.net/manual/en/function.array-combine.php I'll shut up now, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

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