File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1515use phpDocumentor \Reflection \Types \Array_ ;
1616use phpDocumentor \Reflection \Types \Compound ;
1717use phpDocumentor \Reflection \Types \Context ;
18+ use phpDocumentor \Reflection \Types \Iterable_ ;
1819use phpDocumentor \Reflection \Types \Object_ ;
1920
2021final class TypeResolver
@@ -47,7 +48,8 @@ final class TypeResolver
4748 'true ' => 'phpDocumentor\Reflection\Types\Boolean ' ,
4849 'self ' => 'phpDocumentor\Reflection\Types\Self_ ' ,
4950 '$this ' => 'phpDocumentor\Reflection\Types\This ' ,
50- 'static ' => 'phpDocumentor\Reflection\Types\Static_ '
51+ 'static ' => 'phpDocumentor\Reflection\Types\Static_ ' ,
52+ 'iterable ' => Iterable_::class,
5153 );
5254
5355 /** @var FqsenResolver */
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of phpDocumentor.
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ *
8+ * @copyright 2010-2017 Mike van Riel<[email protected] > 9+ * @license http://www.opensource.org/licenses/mit-license.php MIT
10+ * @link http://phpdoc.org
11+ */
12+
13+ namespace phpDocumentor \Reflection \Types ;
14+
15+ use phpDocumentor \Reflection \Type ;
16+
17+ /**
18+ * Value Object representing iterable type
19+ */
20+ final class Iterable_ implements Type
21+ {
22+ /**
23+ * Returns a rendered output of the Type as it would be used in a DocBlock.
24+ *
25+ * @return string
26+ */
27+ public function __toString ()
28+ {
29+ return 'iterable ' ;
30+ }
31+ }
Original file line number Diff line number Diff line change 1616use phpDocumentor \Reflection \Types \Array_ ;
1717use phpDocumentor \Reflection \Types \Compound ;
1818use phpDocumentor \Reflection \Types \Context ;
19+ use phpDocumentor \Reflection \Types \Iterable_ ;
1920use phpDocumentor \Reflection \Types \Object_ ;
2021
2122/**
@@ -377,6 +378,7 @@ public function provideKeywords()
377378 ['$this ' , 'phpDocumentor\Reflection\Types\This ' ],
378379 ['static ' , 'phpDocumentor\Reflection\Types\Static_ ' ],
379380 ['self ' , 'phpDocumentor\Reflection\Types\Self_ ' ],
381+ ['iterable ' , Iterable_::class],
380382 ];
381383 }
382384
You can’t perform that action at this time.
0 commit comments