[Flow] [RFC] CGL: Allow "ArrayElementType[]" syntax
Carsten Bleicker
carsten at bleicker.de
Thu Feb 5 12:09:47 CET 2015
+10000
Mit sonnigem Gruß
Carsten Bleicker
----------------------
Carsten Bleicker
Wülfingstraße 1
42477 Radevormwald
E-Mail: carsten at bleicker.de
Web: www.bleicker.de
Twitter: @carstenbleicker
Jabber: cbleicker at jabber.ccc.de
Telefon: +49 (0)171-2690845
> Am 05.02.2015 um 11:31 schrieb Bastian Waidelich <bastian at typo3.org>:
>
> Hi all,
>
> what do you think about allowing (= add to our CGL) the following syntax for "generic" arrays:
>
> /**
> * @var User[]
> **/
> protected $users;
>
> We currently suggest
>
> /**
> * @var array<User>
> **/
> protected $users;
>
> But that is not supported by common IDEs (yet) so you'll have to add s.th. like
>
> /** @var User $user **/
> foreach ($this->users as $user) {
> }
>
> in order to get code-completion, highlighting and (most importantly) refactoring support.
>
> --
> Bastian Waidelich
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list