Skip to content

Conversation

@ajgarlag
Copy link
Contributor

Based on https://getrector.org/demo/e99068d4-3691-4653-ab58-24f20efa13bf

This is my first PR on this project. Thanks for your work!

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
}

if (isset($funcCall->args[2])) {
if ($this->isName($funcCall->name, 'strpos') && $this->isPositiveInteger($funcCall->args[2]->value)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the same is true for stripos?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule only works with strpos y strstr

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit 30afbb8 into rectorphp:main Nov 22, 2022
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