Skip to content

Commit

Permalink
Remove unused array_merge()
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoepner committed Dec 5, 2018
1 parent 8501853 commit 703c9c1
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions src/ApiManager.php
Expand Up @@ -78,19 +78,17 @@ public function triggerDoubleOptInEmail(string $email, int $formId, array $optio
return $this->adapter->action(
'post',
"/v3/forms.json/{$formId}/send/activate",
array_merge(
[
'email' => $email,
'doidata' => array_merge(
[
'user_ip' => $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1',
'referer' => $_SERVER['HTTP_REFERER'] ?? 'http://localhost',
'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'FakeAgent/2.0 (Ubuntu/Linux)',
],
$options
),
]
)
[
'email' => $email,
'doidata' => array_merge(
[
'user_ip' => $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1',
'referer' => $_SERVER['HTTP_REFERER'] ?? 'http://localhost',
'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'FakeAgent/2.0 (Ubuntu/Linux)',
],
$options
),
]
);
}

Expand All @@ -102,19 +100,17 @@ public function triggerDoubleOptOutEmail(string $email, int $formId, array $opti
return $this->adapter->action(
'post',
"/v3/forms.json/{$formId}/send/deactivate",
array_merge(
[
'email' => $email,
'doidata' => array_merge(
[
'user_ip' => $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1',
'referer' => $_SERVER['HTTP_REFERER'] ?? 'http://localhost',
'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'FakeAgent/2.0 (Ubuntu/Linux)',
],
$options
),
]
)
[
'email' => $email,
'doidata' => array_merge(
[
'user_ip' => $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1',
'referer' => $_SERVER['HTTP_REFERER'] ?? 'http://localhost',
'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'FakeAgent/2.0 (Ubuntu/Linux)',
],
$options
),
]
);
}

Expand Down

0 comments on commit 703c9c1

Please sign in to comment.