3 ms·
There was a time when I would've been all-out in favor for this because one of the most often used functions in Drupal had no less than seven arguments: https:/
by chx 6y ago
There was a time when I would've been all-out in favor for this because one of the most often used functions in Drupal had no less than seven arguments: https://api.drupal.org/api/drupal/includes%21common.inc/function/l/5.x https://api.drupal.org/api/drupal/includes%21common.inc/func... it being seven, the running joke was knowing the Seven Parameters Of L is our initiation rite.
Then the options collapsed into an array https://api.drupal.org/api/drupal/includes%21common.inc/function/l/6.x https://api.drupal.org/api/drupal/includes%21common.inc/func... and that was in 2008.
And then URLs in 2015 became a value object and while you can still pass absolute => TRUE in options if you really want to, you can just call setAbsolute() on the object.
I guess if PHP core adopts this , phpstorm will quickly adopt as well and typing strpos( will immediately expand to strpos(haystack: , needle: so you can just fill that in. I guess? so maybe a reluctant yes but I am a bit wary of the APIs that will follow from this. I guess I have slowly grown fond of value objects? I must be getting old.