? Pending

User tests: Successful: Unsuccessful:

avatar eopws
eopws
14 Apr 2021

Summary of Changes

Merged two if blocks with the same condition

Testing Instructions

Go to libraries/src/Document/HtmlDocument.php, see lines 707 and 712, if blocks on these lines have the same conditions and can be merged in order to reduce code.

avatar eopws eopws - open - 14 Apr 2021
avatar eopws eopws - change - 14 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Apr 2021
Category Libraries
avatar richard67
richard67 - comment - 14 Apr 2021

@eopws Sorry but this pull request is wrong. You are right, the "if" conditions are identical. But inside the first "if" block the "$template" variable is modified, and this is checked again in the "2nd" if condition. And so this sequence of if conditions has to be like it is. In general it is not enough to read just 1 or 2 lines of code, one should also read what is before and after these 2 lines of code and is relevant.

avatar richard67 richard67 - change - 14 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-14 17:07:05
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 14 Apr 2021
avatar richard67
richard67 - comment - 14 Apr 2021

2021-04-14_1

avatar eopws
eopws - comment - 14 Apr 2021

Sorry, I didn't notice that. I have to be more careful next time.

Add a Comment

Login with GitHub to post a comment