Skip to content

Commit

Permalink
[TASK] Always use a backslash when calling global functions
Browse files Browse the repository at this point in the history
Using a leading backslash when calling a function in the global namespace
provides a (small) performance benefit.

Adjust the PHP CS Fixer configuration to add any missing backslashes.
  • Loading branch information
oliverklee committed Jun 20, 2020
1 parent 22dde22 commit 2cb778a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
[#907](https://github.com/MyIntervals/emogrifier/pull/907))

### Changed
- Automatically add a backslash for global functions
([#909](https://github.com/MyIntervals/emogrifier/pull/909))
- Update the development tools
([#898](https://github.com/MyIntervals/emogrifier/pull/898),
[#895](https://github.com/MyIntervals/emogrifier/pull/895))
Expand Down
3 changes: 1 addition & 2 deletions config/php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
'method_separation' => true,
'modernize_types_casting' => true,
'native_function_casing' => true,
// not yet, but maybe later to improve performance
// 'native_function_invocation' => true,
'native_function_invocation' => true,
'new_with_braces' => true,
'no_alias_functions' => true,
'no_blank_lines_after_class_opening' => true,
Expand Down

0 comments on commit 2cb778a

Please sign in to comment.