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

Enforce typing primitive parameters for certain functions #77

Open
krzysztofrewak opened this issue Jun 10, 2022 · 0 comments
Open

Enforce typing primitive parameters for certain functions #77

krzysztofrewak opened this issue Jun 10, 2022 · 0 comments
Labels
new rule New rules for ECS

Comments

@krzysztofrewak
Copy link
Member

I believe that would be really hard to do this for every function, but some of them are really common cases that we can cover by hardcoding it.

For example this:

json_decode($content, true);
in_array($key, $array, true);

should be written as this:

json_decode($content, associative: true);
in_array($key, $array, strict: true);

We should also think about other examples here.

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

No branches or pull requests

1 participant