Skip to content

Comments

[5.3] Use ternary operator for libraries#44921

Merged
HLeithner merged 1 commit intojoomla:5.3-devfrom
joomdonation:use_ternary_operator_for_libraries
Feb 22, 2025
Merged

[5.3] Use ternary operator for libraries#44921
HLeithner merged 1 commit intojoomla:5.3-devfrom
joomdonation:use_ternary_operator_for_libraries

Conversation

@joomdonation
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

This PR uses TernaryToElvisRector rector rule to improve libraries code using ?: operator instead of ? operator, where useful. This is done automatically by rector, no manual change included.

Testing Instructions

Code review

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works, with cleaner, easier to read code

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

@rdeutz
Copy link
Contributor

rdeutz commented Feb 16, 2025

Instead of doing code review we could test if the calendar field is still working and if default values are used.

@joomdonation
Copy link
Contributor Author

Thanks Robert. That works for this specific rector PR. Normally, a PR generated by rector rule will change codes in many fields on different places, so human test it in-efficient. We would need careful code review from developers.

@QuyTon
Copy link
Contributor

QuyTon commented Feb 16, 2025

I have tested this item ✅ successfully on f9d46d4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44921.

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on f9d46d4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44921.

@alikon
Copy link
Contributor

alikon commented Feb 17, 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44921.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 17, 2025
Copy link
Member

@HLeithner HLeithner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

@HLeithner HLeithner merged commit e95d87b into joomla:5.3-dev Feb 22, 2025
4 checks passed
@HLeithner
Copy link
Member

thanks

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 22, 2025
@joomdonation joomdonation deleted the use_ternary_operator_for_libraries branch February 22, 2025 15:51
@QuyTon QuyTon added this to the Joomla! 5.3.0 milestone Feb 23, 2025
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.

7 participants