User tests: Successful: Unsuccessful:
Please see changes
Pull Request for Issue # .
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
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.
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');
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);
}
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
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.
should this be closed?
@HLeithner is it a problem if i close a PR and you wan't to merge it later?
closed as annotated there is no benefit, adding a loop to line 403 makes more sense but have to build for j4.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-29 13:31:16 |
Closed_By | ⇒ | HLeithner | |
Labels |
Removed:
J3 Issue
|
@saharin88 can you please describe what this Pull Request is about?