PR-5.3-dev Pending

User tests: Successful: 0 Unsuccessful: 0

avatar janschoenherr
janschoenherr
5 Dec 2024

Summary of Changes

  • Remove unnecessary type casts
  • Simplify boolean expressions
  • Unwrap sprintf() calls with single argument
  • Replace switch statements with single branch with if statements
  • Use str_*() functions
  • Replace calls like dirname(__FILE__) with __DIR__

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar janschoenherr janschoenherr - open - 5 Dec 2024
avatar janschoenherr janschoenherr - change - 5 Dec 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2024
Category Administration com_associations com_categories com_config com_content com_fields com_finder com_installer com_joomlaupdate com_menus com_modules com_redirect com_tags
avatar janschoenherr janschoenherr - change - 5 Dec 2024
Labels Added: PR-5.3-dev
avatar janschoenherr janschoenherr - change - 5 Dec 2024
The description was changed
avatar janschoenherr janschoenherr - edited - 5 Dec 2024
avatar janschoenherr janschoenherr - change - 5 Dec 2024
The description was changed
avatar janschoenherr janschoenherr - edited - 5 Dec 2024
avatar laoneo
laoneo - comment - 17 Jan 2025

Did you do that manually or by a code analyzer tool like rector PHP?

avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2025
Category Administration com_associations com_categories com_config com_content com_fields com_finder com_installer com_joomlaupdate com_menus com_modules com_redirect com_tags Administration com_associations com_banners com_categories com_config com_contact com_content com_cpanel com_fields com_finder com_installer
avatar janschoenherr
janschoenherr - comment - 17 Jan 2025

Did you do that manually or by a code analyzer tool like rector PHP?

I did that mostly using PhpStorm.

avatar joomdonation
joomdonation - comment - 11 Feb 2025

Thanks for your hard work on this PR. But I think make changes to many files like this in a single PR will make it hard for us to review the change to make sure it is correct

If it is possible, I would suggest you to split the PR into smaller PRs, each PR for a single rule like Remove unnecessary type casts in one PR, Simplify boolean expressions in another PR and so on. For Use str_*() functions, if you have experience with rector, I would suggest you to use that tool to do the change instead of doing it manually by hand.

Add a Comment

Login with GitHub to post a comment