* Adds parameters to the command. All parameters are sanitized via Shell::escape().
* Null values are ignored.
*
- * @param string|string[] $args,...
+ * @param string|string[] ...$args
* @return $this
*/
- public function params( /* ... */ ) {
- $args = func_get_args();
+ public function params( ...$args ) {
if ( count( $args ) === 1 && is_array( reset( $args ) ) ) {
// If only one argument has been passed, and that argument is an array,
// treat it as a list of arguments
* Adds unsafe parameters to the command. These parameters are NOT sanitized in any way.
* Null values are ignored.
*
- * @param string|string[] $args,...
+ * @param string|string[] ...$args
* @return $this
*/
- public function unsafeParams( /* ... */ ) {
- $args = func_get_args();
+ public function unsafeParams( ...$args ) {
if ( count( $args ) === 1 && is_array( reset( $args ) ) ) {
// If only one argument has been passed, and that argument is an array,
// treat it as a list of arguments
}
// clear get_last_error without actually raising an error
- // from https://secure.php.net/manual/en/function.error-get-last.php#113518
+ // from https://www.php.net/manual/en/function.error-get-last.php#113518
// TODO replace with clear_last_error when requirements are bumped to PHP7
set_error_handler( function () {
}, 0 );