Skip to content

Overwrite whereIn function in MorphMany relation. #1816

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

Closed
wants to merge 4 commits into from

Conversation

skuio
Copy link

@skuio skuio commented Aug 26, 2019

When we using MorphMany relation, this Exception occurred:
Call to undefined method Jenssegers\Mongodb\Query\Builder::compileWhereInRaw()

This PR overwrite whereInMethod function to return whereIn instade of the default (whereInRaw).

@skuio
Copy link
Author

skuio commented Aug 26, 2019

We try to solve the check errors, but still, we have some errors we can't solve it.

  • The "WordPress.WP.PreparedSQL" sniff has been renamed to "WordPress.DB.PreparedSQL". Please update your custom ruleset.

  • The "WordPress.XSS.EscapeOutput" sniff has been renamed to "WordPress.Security.EscapeOutput". Please update your custom ruleset.

  • Avoid unused parameters such as '$key'. we overwrite function only!

protected function whereInMethod(EloquentModel $model, $key) { return 'whereIn'; }

How to solve these errors?

Thanks!

@Smolevich
Copy link
Contributor

Warnings about WordPress linked with settings for Codacy. I think that him changing are available only @jenssegers. Avoid unused parameters such as '$key' absolutely correct because args in function don't use. Original function

@divine
Copy link
Contributor

divine commented Jan 20, 2020

This is duplicate and should be closed in favor of #1871

cc @Smolevich

@Smolevich
Copy link
Contributor

Duplicate of #1871

@Smolevich Smolevich marked this as a duplicate of #1871 Jan 27, 2020
@Smolevich Smolevich closed this Jan 27, 2020
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

Successfully merging this pull request may close these issues.

4 participants