Skip to content
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

Support for and() in \Dibi\Fluent #298

Closed
integer opened this issue Jun 28, 2018 · 1 comment
Closed

Support for and() in \Dibi\Fluent #298

integer opened this issue Jun 28, 2018 · 1 comment

Comments

@integer
Copy link
Contributor

integer commented Jun 28, 2018

I checking some codebase using Dibi with PHPStan. PHPStan gives me errors like this Call to an undefined method Dibi\Fluent::and().

It is because some colleagues uses constructions like $fluent->where('columnA = 1')->and('columnB = 2');. Dibi\Fluent understand this syntax and produce as same query as for $fluent->where('columnA = 1 AND columnB = 2');. Problem is in missing class @method annotation for and(...$cond) function. Would it be possible to add annotation for this method?

Same issue is in $fluent->join('tableA a')->on('a.columnA = b.id')->and('a.columnB = 2');

UPDATE:
I found usage methods Dibi\Fluent::desc() and Dibi\Fluent::asc() too.

@dg
Copy link
Owner

dg commented Jun 28, 2018

Can you send pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants