? Failure

User tests: Successful: Unsuccessful:

avatar saharin88
saharin88
23 Aug 2018

Please see changes

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Expected result

Actual result

Documentation Changes Required

avatar saharin88 saharin88 - open - 23 Aug 2018
avatar saharin88 saharin88 - change - 23 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2018
Category Libraries
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2018

@saharin88 can you please describe what this Pull Request is about?

avatar Bakual
Bakual - comment - 22 Dec 2018

Looks like you want to be able to pass an array to Text::script(). What would the reason be for that?
If you have multiple strings to add, why not just do the foreach in your code? Should be simple and probably more performant.

avatar saharin88
saharin88 - comment - 22 Dec 2018

Looks like you want to be able to pass an array to Text::script(). What would the reason be for that?
If you have multiple strings to add, why not just do the foreach in your code? Should be simple and probably more performant.

I think better
Text::script(['key1','key2','key3']);
than so
Text::script('key1');
Text::script('key2');
Text::script('key3');

avatar Bakual
Bakual - comment - 23 Dec 2018

Personally, I don't think it's better. I'd just do this

$keys = array('key1','key2','key3');
foreach ($keys as $key) {
    Text::script($key);
}
avatar saharin88
saharin88 - comment - 23 Dec 2018

Personally, I don't think it's better. I'd just do this

but I do not think so
we can leave it as it is

avatar mbabker
mbabker - comment - 23 Dec 2018

There is no practical benefit here. What this PR does is basically exactly what @Bakual is demonstrating, but within the method's code (so it is recursively calling itself). If it were optimized to natively support arrays without a recursive/loop call, maybe there would be a benefit in taking this, otherwise I don't see the point.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Apr 2019

should this be closed?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Apr 2019

@HLeithner is it a problem if i close a PR and you wan't to merge it later?

avatar HLeithner
HLeithner - comment - 29 Apr 2019

closed as annotated there is no benefit, adding a loop to line 403 makes more sense but have to build for j4.

avatar HLeithner HLeithner - change - 29 Apr 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-04-29 13:31:16
Closed_By HLeithner
Labels Removed: J3 Issue
avatar HLeithner HLeithner - close - 29 Apr 2019

Add a Comment

Login with GitHub to post a comment