-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix invalid return type in docblock #1496
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3881 We use Jira to track the state of pull requests and the versions they got |
@@ -183,7 +183,7 @@ public function expr() | |||
* | |||
* @param boolean $cacheable | |||
* | |||
* @return \Doctrine\ORM\AbstractQuery This query instance. | |||
* @return QueryBuilder |
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.
It is better use @return $this
here. An explanation https://github.com/php-fig/fig-standards/pull/169/files#diff-9a10a11696dc38209c125ea9c57a565fR2195
For "fluent" chaining, can you use |
@DHager Yes. For the moment I just fixed the one that were incorrect so know all method returning $this have QueryBuilder as return type so in IDEs we have no more issues reported. |
@dag-io can you check consistency in other classes, like https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/AbstractQuery.php#L343 and others? |
@Koc, it's all good now |
👍 |
@@ -183,7 +183,7 @@ public function __construct(EntityManagerInterface $em) | |||
* | |||
* @param boolean $cacheable | |||
* | |||
* @return static This query instance. | |||
* @return $this This query instance. |
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.
static
was correct here
I manually applied the patch after a rebase and reverting Thanks @dag-io, sorry for the long delay! |
Thank you @Ocramius |
No description provided.