[5.3] Use Null Coalescing Assignment Operator For Components#44878
Conversation
administrator/components/com_content/src/Event/Model/FeatureEvent.php
Outdated
Show resolved
Hide resolved
|
@joomdonation Could you fix the PHPCS issues listed here? https://ci.joomla.org/joomla/joomla-cms/82216/1/7 |
|
Done, thanks @richard67 . It's strange that our PHPCS has special treatment for |
|
I have tested this item ✅ successfully on 7045b5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44878. |
1 similar comment
|
I have tested this item ✅ successfully on 7045b5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44878. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44878. |
| $menuitem->submenu = []; | ||
| $menuitem->class = $menuitem->img ?? ''; | ||
| $menuitem->scope = $menuitem->scope ?? null; | ||
| $menuitem->scope ??= null; |
There was a problem hiding this comment.
code style, and the line above is basically exact the same but is not converted?
There was a problem hiding this comment.
I fixed that code style before, but our PHPCS does not allow it passed, so I had to revert the fix back. We have strange behavior with PHPCS for ??= operator here.
For the line above, if you are talking about the line $menuitem->class = $menuitem->img ?? '';, then it is not the same.
There was a problem hiding this comment.
ok, then we can't merge this, until cs checker is fixed. (and yes you are right above is not the same)
HLeithner
left a comment
There was a problem hiding this comment.
Code style and missing conversations, please the the full pr for missing spaces.
thanks
|
thanks |
Pull Request for Issue # .
Summary of Changes
This PR uses NullCoalescingOperatorRector rector rule to improve components code using
??=operator. 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