That would be @param DateInterval[][] ...$intervals then.

Zitat von Stefano Torresi <[email protected]>:

Hey list,
what if one wanted to hint to a varable number of arrays of DateInterval?  
   e.g. `func(array ...$intervals) {}`
    
Isn't this what `@param DateInterval[] ...$intervals` should actually be used for?
    
   Cheers

Il Lun 15 Ott 2018, 23:12 Woody Gilk <[email protected]> ha scritto:

I agree with Chuck's analysis, as it follows closely with how the code
is written.
--
Woody Gilk
https://shadowhand.me

On Mon, Oct 15, 2018 at 3:55 PM Robbie Averill <[email protected]> wrote:

Hi Chuck,

Seeing as $intervals is an array when accessed directly from within the method (via $intervals), it seems to me that @param DateInterval[] ...$intervals would make sense.

Cheers,
Robbie

On Mon, 15 Oct 2018 at 22:46, Chuck Burgess <[email protected]> wrote:

The current draft does not contain references to or examples of variadic parameters, since they entered the PHP language after the early PSR-5 drafts were done.  Assuming that folks agree that they should be represented in the spec, this email thread opens the discussion on the syntax to use.

Previous discussion exists here (https://github.com/phpDocumentor/fig-standards/issues/121), for background reading.

The key question on syntax is not whether to include "..." in the spec, but with whether or not "[]" should also be shown:

* @param DateInterval[] ...$intervals

vs

* @param DateInterval ...$intervals

Both are meant to imply that the variable number of parameters passed can be expected to be found inside an $intervals array of DateInterval objects.

Please reply to this thread with thoughts on this...
CRB

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected][1].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/7176991b-5b4e-4d88-adeb-9ccd3189f7a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robbie Averill | Senior Developer
04 978 7330
http://silverstripe.com/

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected][1].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CANv6TC1XyHBVnj1siXkQcHH3SNahVrsRBLSf7XTy1v2Bmh6T5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected][1].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAGOJM6%2BG9_Pwf-NWE6JTBh1cJ%3Dqx3_3vLYU0NrBFTgAh%2BXSGqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
 

  --
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFojS1tMJGeXmzeo5_jVrSpt2UZu93iBpN195hbYKzoNHtHQxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



Links:
------
[1] mailto:php-fig%[email protected]
-------------------------
Jan Schneider
The Horde Project
https://www.horde.org/

--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/20181016072341.Horde.tiuPVdy5rkvZXMmPNIzZYiY%40yunosh.horde.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to