mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-12-01 17:36:05 +03:00
Replace passing “by value” with “by reference”
This commit is contained in:
parent
f64acb148b
commit
0d1958d8b6
@ -152,7 +152,6 @@ class Member extends HttpApi
|
||||
case 'vars':
|
||||
if (is_array($value)) {
|
||||
$value = json_encode($value);
|
||||
$parameters[$field] = $value;
|
||||
}
|
||||
// We should assert that "vars"'s $value is a string.
|
||||
// no break
|
||||
@ -195,12 +194,11 @@ class Member extends HttpApi
|
||||
Assert::stringNotEmpty($address);
|
||||
Assert::isArray($parameters);
|
||||
|
||||
foreach ($parameters as $field => $value) {
|
||||
foreach ($parameters as $field => &$value) {
|
||||
switch ($field) {
|
||||
case 'vars':
|
||||
if (is_array($value)) {
|
||||
$value = json_encode($value);
|
||||
$parameters[$field] = $value;
|
||||
}
|
||||
// We should assert that "vars"'s $value is a string.
|
||||
// no break
|
||||
|
Loading…
Reference in New Issue
Block a user