Re: svn: /phpdoc/en/trunk/reference/spl/emptyiterator/ current.xml key.xml valid.xml
| From: | Peter Cowburn | Date: | Sun, 10 Jan 2016 18:56:23 +0000 |
| Subject: | Re: svn: /phpdoc/en/trunk/reference/spl/emptyiterator/ current.xml key.xml valid.xml | ||
| References: | 1 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-13968@lists.php.net to get a copy of this message | ||
On 10 January 2016 at 16:49, Thomas Punt <tpunt@php.net> wrote:
> tpunt Sun, 10 Jan 2016 16:49:58 +0000
>
> Revision:
> http://svn.php.net/viewvc?view=revision&revision=338453
>
> Log:
> Resolve doc bug #71324
>
> Bug: https://bugs.php.net/71324 (Open) EmptyIterator: invalid
> return types
>
I don't think that this change is what we want. Fact is that current() and
key() will "return" void from EmptyIterator. It will never be anything
else, and should IMO be documented as such: in the method prototypes (as
they were before this change), andin the return value descriptions. For
both of the methods, the current return value description is "No value is
returned" so anything other than void in the prototype will only serve to
confuse the matter for the reader.
>
> Changed paths:
> U phpdoc/en/trunk/reference/spl/emptyiterator/current.xml
> U phpdoc/en/trunk/reference/spl/emptyiterator/key.xml
> U phpdoc/en/trunk/reference/spl/emptyiterator/valid.xml
>
> Modified: phpdoc/en/trunk/reference/spl/emptyiterator/current.xml
> ===================================================================
> --- phpdoc/en/trunk/reference/spl/emptyiterator/current.xml 2016-01-10
> 16:44:57 UTC (rev 338452)
> +++ phpdoc/en/trunk/reference/spl/emptyiterator/current.xml 2016-01-10
> 16:49:58 UTC (rev 338453)
> @@ -10,7 +10,7 @@
> <refsect1 role="description">
> &reftitle.description;
> <methodsynopsis>
> - <modifier>public</modifier>
> <type>void</type><methodname>EmptyIterator::current</methodname>
> + <modifier>public</modifier>
> <type>mixed</type><methodname>EmptyIterator::current</methodname>
> <void />
> </methodsynopsis>
> <para>
>
> Modified: phpdoc/en/trunk/reference/spl/emptyiterator/key.xml
> ===================================================================
> --- phpdoc/en/trunk/reference/spl/emptyiterator/key.xml 2016-01-10
> 16:44:57 UTC (rev 338452)
> +++ phpdoc/en/trunk/reference/spl/emptyiterator/key.xml 2016-01-10
> 16:49:58 UTC (rev 338453)
> @@ -10,7 +10,7 @@
> <refsect1 role="description">
> &reftitle.description;
> <methodsynopsis>
> - <modifier>public</modifier>
> <type>void</type><methodname>EmptyIterator::key</methodname>
> + <modifier>public</modifier>
> <type>scalar</type><methodname>EmptyIterator::key</methodname>
> <void />
> </methodsynopsis>
> <para>
>
> Modified: phpdoc/en/trunk/reference/spl/emptyiterator/valid.xml
> ===================================================================
> --- phpdoc/en/trunk/reference/spl/emptyiterator/valid.xml 2016-01-10
> 16:44:57 UTC (rev 338452)
> +++ phpdoc/en/trunk/reference/spl/emptyiterator/valid.xml 2016-01-10
> 16:49:58 UTC (rev 338453)
> @@ -10,7 +10,7 @@
> <refsect1 role="description">
> &reftitle.description;
> <methodsynopsis>
> - <modifier>public</modifier>
> <type>void</type><methodname>EmptyIterator::valid</methodname>
> + <modifier>public</modifier>
> <type>bool</type><methodname>EmptyIterator::valid</methodname>
> <void />
> </methodsynopsis>
> <para>
>
>
> --
> PHP Documentation Commits Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>