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

Automated native_function_invocation fixes #806

Conversation

draco2003
Copy link

Reproduce with:
php php-cs-fixer --rules=native_function_invocation fix ./ --allow-risky=yes
(php-cs-fixer from : https://cs.symfony.com/)

Details:
https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/

@ob-stripe
Copy link
Contributor

Hi @draco2003, thanks for the contribution! We're actually already using PHP CS Fixer to format the library's code, but I didn't know about this rule.

I'm generally in favor of this change, but it looks like one of the tests is no longer passing. Mind taking a closer look? Otherwise I'm happy to do so myself when I have a chance.

@draco2003
Copy link
Author

Thanks for the quick response.
Let me take a look and see If i can fix the test failure issue.
Other Repos with this similar PR failed due to particular mocking of builtin functions.

@draco2003
Copy link
Author

Quick question based on other libraries feedback.
Would you perfer the \is_array syntax or the:
use function is_array;

?

@ob-stripe
Copy link
Contributor

Quick question based on other libraries feedback.
Would you perfer the \is_array syntax or the:
use function is_array;

?

I'd prefer \is_array.

@ob-stripe
Copy link
Contributor

Closed in favor of #858.

@ob-stripe ob-stripe closed this Feb 4, 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.

3 participants