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

MinutesToSecondsInCacheRector Rule is applied when the argument is already multiplied correctly #299

Open
spoyntersmith opened this issue Jan 24, 2025 · 0 comments

Comments

@spoyntersmith
Copy link

spoyntersmith commented Jan 24, 2025

// already multiplied
if ($argExpr instanceof Mul) {
return null;
}

    $seconds = User::LOCKOUT_TIME_IN_MINUTES * 60;

    Cache::add($key, $value, $seconds);

Becomes

    $seconds = User::LOCKOUT_TIME_IN_MINUTES * 60;

    Cache::add($key, $value, $seconds * 60);

Desired outcome is no change.

@spoyntersmith spoyntersmith changed the title Rule is applied when the argument is already multiplied correctly MinutesToSecondsInCacheRector Rule is applied when the argument is already multiplied correctly Jan 24, 2025
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

1 participant