]> granicus.if.org Git - php/commit
Update array parameter names for named parameters
authorLarry Garfield <larry@garfieldtech.com>
Wed, 26 Aug 2020 22:20:22 +0000 (17:20 -0500)
committerSara Golemon <pollita@php.net>
Mon, 14 Sep 2020 14:56:49 +0000 (14:56 +0000)
commit96f2f3174bb7d3c5367b5a48817f485cef5ed71b
treeed29f577f1b63d932737a1256ba0345bac68a315
parent57a4a2c5a8ddd7e2f1214d5b05c270992e19451e
Update array parameter names for named parameters

* The array "subject" of a function gets called $array.

* Further parameters should be self-descriptive if used
  as a named parameter, and a full word, not an abbreviation.

* If there is a "bunch more arrays" variadic, it gets
  called $arrays (because that's what was already there).

* A few functions have a variadic "a bunch more arrays,
  and then a callable", and were already called $rest.
  I left those as is and died a little inside.

* Any callable provided to an array function that acts
  on the array is called $callback. (Nearly all were already,
  I just fixed the one or two outliers.)

* array_multisort() is beyond help so I ran screaming.
12 files changed:
Zend/tests/bug31720.phpt
Zend/tests/named_params/missing_param.phpt
ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
ext/spl/tests/arrayObject_asort_basic1.phpt
ext/spl/tests/arrayObject_ksort_basic1.phpt
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h [changed mode: 0755->0644]
ext/standard/tests/array/array_fill_error.phpt
ext/standard/tests/array/array_map_variation10.phpt
ext/standard/tests/array/array_walk_recursive_variation8.phpt
ext/standard/tests/array/array_walk_variation8.phpt
ext/standard/tests/array/bug74345.phpt