add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support

This commit is contained in:
Daniel Espendiller 2016-06-12 12:30:51 +02:00
parent a77431c85b
commit ede35568bf
9 changed files with 19 additions and 7 deletions

View File

@ -20,6 +20,9 @@ use Symfony\Component\Console\Command\Command;
*/
class HelperSet implements \IteratorAggregate
{
/**
* @var Helper[]
*/
private $helpers = array();
private $command;
@ -109,6 +112,9 @@ class HelperSet implements \IteratorAggregate
return $this->command;
}
/**
* @return Helper[]
*/
public function getIterator()
{
return new \ArrayIterator($this->helpers);

View File

@ -646,7 +646,7 @@ class Finder implements \IteratorAggregate, \Countable
*
* This method implements the IteratorAggregate interface.
*
* @return \Iterator An iterator
* @return \Iterator|SplFileInfo[] An iterator
*
* @throws \LogicException if the in() method has not been called
*/

View File

@ -47,6 +47,8 @@ class ChoiceGroupView implements \IteratorAggregate
/**
* {@inheritdoc}
*
* @return ChoiceGroupView[]|ChoiceView[]
*/
public function getIterator()
{

View File

@ -1022,7 +1022,7 @@ class Form implements \IteratorAggregate, FormInterface
/**
* Returns the iterator for this group.
*
* @return \Traversable
* @return \Traversable|FormInterface[]
*/
public function getIterator()
{

View File

@ -231,6 +231,8 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
/**
* {@inheritdoc}
*
* @return FormBuilderInterface[]
*/
public function getIterator()
{

View File

@ -143,7 +143,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Returns an iterator to iterate over children (implements \IteratorAggregate).
*
* @return \ArrayIterator The iterator
* @return \ArrayIterator|FormView[] The iterator
*/
public function getIterator()
{

View File

@ -26,7 +26,7 @@ class DumperCollection implements \IteratorAggregate
private $parent;
/**
* @var (DumperCollection|DumperRoute)[]
* @var DumperCollection[]|DumperRoute[]
*/
private $children = array();
@ -38,7 +38,7 @@ class DumperCollection implements \IteratorAggregate
/**
* Returns the children routes and collections.
*
* @return (DumperCollection|DumperRoute)[] Array of DumperCollection|DumperRoute
* @return DumperCollection[]|DumperRoute[] Array of DumperCollection|DumperRoute
*/
public function all()
{
@ -76,7 +76,7 @@ class DumperCollection implements \IteratorAggregate
/**
* Returns an iterator over the children.
*
* @return \Iterator The iterator
* @return \Iterator|DumperCollection[]|DumperRoute[] The iterator
*/
public function getIterator()
{

View File

@ -49,7 +49,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
*
* @see all()
*
* @return \ArrayIterator An \ArrayIterator object for iterating over routes
* @return \ArrayIterator|Route[] An \ArrayIterator object for iterating over routes
*/
public function getIterator()
{

View File

@ -107,6 +107,8 @@ class ConstraintViolationList implements \IteratorAggregate, ConstraintViolation
/**
* {@inheritdoc}
*
* @return \ArrayIterator|ConstraintViolationInterface[]
*/
public function getIterator()
{