Closed warcooft closed 4 months ago
The recent modifications in the codebase enhance the functionality and clarity of the ShieldOAuth
and NewShieldOauthGenerator
classes. The allOAuth
method now creates a fresh instance of Autoload
each time it is called, promoting better isolation. Additionally, the run
method in the NewShieldOauthGenerator
class replaces strpos
with the more expressive str_contains
, improving readability and aligning with modern PHP practices.
Files | Change Summary |
---|---|
src/Libraries/Basic/ShieldOAuth.php |
In allOAuth , a new Autoload instance is created using new Autoload() instead of fetching a pre-configured instance, ensuring fresh instance usage. |
src/Commands/Generators/NewShieldOauthGenerator.php |
In run , strpos is replaced with str_contains to check for 'OAuth' in $class , enhancing readability while maintaining the same control flow. |
In fields of code where bunnies play,
A change was made to brighten the day.
New instances hop, no strings attached,
Autoloads spring forth, perfectly matched.
With every call, fresh paths we find,
A leap towards clarity, oh so kind! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai Explain to the contributor that we currently support php version 7.4 so the use of command str_contains
is not allowed.
Also, explain to the contributor that they should not use the merge command for a regular history of commits.
[!TIP] For best results, initiate chat on the files or code changes.
@warcooft:
Please note that our project currently supports PHP version 7.4. Therefore, the use of the str_contains
function is not allowed, as it was introduced in PHP 8.0. You may need to revert to using strpos
for compatibility.
Additionally, to maintain a clean and regular commit history, please avoid using the merge command for routine commits. Instead, consider using rebase or squash methods to keep the history linear and easier to follow.
Thank you for your understanding and cooperation.
See https://github.com/codeigniter4/CodeIgniter4/pull/9052#issuecomment-2241101064
Summary by CodeRabbit
New Features
allOAuth
method is called.str_contains
, improving readability.Bug Fixes