-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support #19036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -46,7 +46,7 @@ public function __construct($label, array $choices = array()) | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* @return ChoiceGroupView[]|ChoiceView[] | |||
*/ | |||
public function getIterator() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the inheritdoc can stay. If I understand correctly how it is supposed to work, {@inheritdoc}
only imports the (long) description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed 👍
@Haehnchen Can you finish this PR? |
bcf33f1
to
21e584f
Compare
…getIterator PhpStorm support
21e584f
to
ede3556
Compare
@fabpot done |
Thank you @Haehnchen. |
…orAggregate::getIterator PhpStorm support (Haehnchen) This PR was merged into the 2.7 branch. Discussion ---------- add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support | Q | A | ------------- | --- | Branch | 2.7 | Bug fix | no | New feature | no | BC breaks | no | Deprecations | no | Tests pass | yes | License | MIT In additional to #16965 PhpStorm supports `IteratorAggregate::getIterator` now. see https://blog.jetbrains.com/phpstorm/2016/06/phpstorm-2016-2-eap-162-844/ example ``` $collection = new \Symfony\Component\Routing\RouteCollection(); foreach ($collection as $route) { $route->getHost(); } ``` Commits ------- ede3556 add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
I was just "playing" with the cart. stacking class together as i noticed collections do not provide ide support. This is just a example for one collection to support autocompletion. So also how this was implemented in Symfony: symfony/symfony#19036 ``` $cart = new \Shopware\Core\Checkout\Cart\Cart(); $cart->getLineItems()[0]->getDescription(); foreach ($cart->getLineItems() as $item) { $item->getDescription(); } ```
I was just "playing" with the cart. stacking class together as i noticed collections do not provide ide support. This is just a example for one collection to support autocompletion. So also how this was implemented in Symfony: symfony/symfony#19036 ``` $cart = new \Shopware\Core\Checkout\Cart\Cart(); $cart->getLineItems()[0]->getDescription(); foreach ($cart->getLineItems() as $item) { $item->getDescription(); } ``` fixes #18
I was just "playing" with the cart. stacking class together as i noticed collections do not provide ide support. This is just a example for one collection to support autocompletion. So also how this was implemented in Symfony: symfony/symfony#19036 ``` $cart = new \Shopware\Core\Checkout\Cart\Cart(); $cart->getLineItems()[0]->getDescription(); foreach ($cart->getLineItems() as $item) { $item->getDescription(); } ``` fixes #18
In additional to #16965 PhpStorm supports
IteratorAggregate::getIterator
now. see https://blog.jetbrains.com/phpstorm/2016/06/phpstorm-2016-2-eap-162-844/example