? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
24 Dec 2021

Code review.

This method is called by passing the size increase to it.

A size increase should be (and is) a number and not a string.

Therefore the docblock is incorrect which in turn makes the concatenation operator incorrect because if it WERE REALLY strings it would be .= and not +=.

More correctly, what this method is passed is integers, or even more correctly, integers or the result of strlen or the result of filesize, the latter of these can also return false which would be passed to this method.

PHP 7.2 (Joomla 4's low php limit) doesn't allow union types but it is common to document them commented out.

I have updated the docblock and now all static analysis is happy.

avatar PhilETaylor PhilETaylor - open - 24 Dec 2021
avatar PhilETaylor PhilETaylor - change - 24 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Dec 2021
Category Libraries
avatar chmst chmst - change - 31 Jan 2022
Labels Added: ?
avatar PhilETaylor PhilETaylor - change - 6 Mar 2022
Labels Added: ?
Removed: ?
avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:34:12
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment