public function specifyAdditionalParameters(array $data, array $additionalParams): array
    {
        foreach ($additionalParams as $param) {
            $method = 'get' . ucfirst($param);
            if (method_exists($this, $method)) {
                $value = $this->{$method}();
                if ($value) {
                    $data[$param] = $value;
                }
            }
        }
        return $data;
    }
public function specifyAdditionalParameters(array $data, array $additionalParams): array
    {
        foreach ($additionalParams as $param) {
            $method = 'get' . ucfirst($param);
            if (method_exists($this, $method)) {
                $value = $this->{$method}();
                if ($value) {
                    $data[$param] = $value;
                }
            }
        }
        return $data;
    }
public function specifyAdditionalParameters ( array $ data , array $ additionalParams ) : array { foreach ( $ additionalParams as $ param ) { $ method = 'get' . ucfirst ( $ param ) ; if ( method_exists ( $ this , $ method ) ) { $ value = $ this -> { $ method } ( ) ; if ( $ value ) { $ data [ $ param ] = $ value ; } } } return $ data ; }
Add additional params to data

@param array $data
@param array $additionalParams
@return array
Add additional params to data