Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2.003 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 49 | public function testCampaign(string $campaignHash, array $emailAddresses, array $customFieldsWithValues = []) |
|
29 | { |
||
30 | 49 | $getParameters = []; |
|
31 | 14 | $postParameters = [ |
|
32 | 49 | 'hash' => $campaignHash, |
|
33 | 49 | 'emails' => $emailAddresses, |
|
34 | 'custom_fields' => $customFieldsWithValues ?: null |
||
35 | ]; |
||
36 | |||
37 | 35 | $postParameters = array_filter($postParameters, function ($value) { |
|
38 | 49 | return $value !== null; |
|
39 | 49 | }); |
|
40 | 49 | $this->processRequest($getParameters, $postParameters); |
|
41 | 7 | return null; |
|
42 | } |
||
51 | } |