Closed pavarnos closed 7 years ago
Hey @pavarnos ,
You have already found the problem.
The QueryFactory
is having @return AbstractQuery
, but it can be an instance of Insert
, Update
, Delete
or Select
interfaces. So the return type declared is wrong. I guess if we fix the return type, it will work as expected.
OK. What should the return type be?
@pavarnos I am not sure whether we can write something like this.
@return Common\SelectInterface|Common\InsertInterface|Common\UpdateInterface|Common\DeleteInterface
There is multiple return type in this case, ie why. . This will work, I have tested with phpdocumentator and apigen .
@pavarnos if you have time, do send a PR. Else I will look sending one.
Thank you.
@harikt @pavarnos Any PRs as a result of this issue?
Sorry I have no time. As @harikt showed above I think it is a one line fix
So i've been fiddling with Scrutinizer a bit. Got an interesting message I don't know how to resolve.
where $this->database is an instance of
Seems like Scrutinizer is looking through the
@return
type declaration of AurasnewUpdate()
to the@return
type declaration ofnewInstance('Update')
.Is this a scrutiniser problem or something Aura can fix by changing type declarations?